How to prevent the json file from containing data of type long to program in Java

I am working on a project and my problem is that every time I create a new map, for some reason, the ids of the tiles, more than once, have a long data type and it causes me problems when programming since the arrays do not They allow data of that type for their index.

Is there any way to fix or change the preferences for that?

Can you show an example of such data? Also, can you go into a little bit more detail about the problem you’re facing with it?

There is a Java library to read Tiled maps, libtiled-java, which though somewhat outdated, should be able to read any map. Maybe it helps to figure out how to deal with this data of type long.

sure, here is a fragment:
{ “compressionlevel”:-1,
“height”:40,
“infinite”:false,
“layers”:[
{
“data”:[3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225476, 3221225483, 11, 11, 2684354564, 2684354571, 2684354571, 2684354571, 2684354564, 2684354564, 2684354564, 2684354571, 2684354564, 2684354564, 2684354564, 2684354564, 2684354571, 2684354571, 11, 11, 1610612747, 1610612747, 1610612740, 1610612744, 1610612744, 1610612756, 1610612756, 1610612740, 1610612740, 1610612747,
3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225483, 3221225476, 3221225476, 3221225483, 3221225483, 11, 11, 2684354571, 2684354564,

GIDs contain flip flags in addition to the tile IDs. You need to parse and remove those before you can use the GID to get the tile ID.

https://doc.mapeditor.org/en/stable/reference/global-tile-ids/

They are 32bit ints, Java definitely supports those. But, since they contain more than just the tile IDs, you should probably not be using them as array indices.

Perfect, I just had to remove the rotation of the object so that it would not generate those long type numbers. Thank you very much for your help.