Off By One in JSON Export?

Tile codes are being stored using different representations in different parts of my JSON export file. For example, if the tile map grid shows that there is tile 140 at some index, the tile metadata is stored as 139 elsewhere in the JSON object. Let me elaborate…

I have created a map and edited certain tiles in the Collision Editor to have collision rectangles. After I export to a JSON file, I find my layers and map array in jsonObject.layers[0].data, where at the tile index there is the number representing my tile. In my case it displays 140, representing the 140th tile in my sheet.

When I look at the tile information in jsonObject.tilesets[0] though, the objectgroup info for the tile in question is stored under index 139, which is one off.

I was hesitant to post this under the bug tag because I realize it might actually be a feature, or perhaps it is because it is representing the “index” of an array, but as it appears to me this structure is closer to a JS object rather than an array anyway. At any rate I thought I’d ask the opinion of the community. If it is a bug then let’s fix it!

Thanks

Duplicate - I found my answer in another post. Nothing to see here!

Just for future reference in case people stumble upon this thread, I assume the post you found is the following one: