Save empty Custom Properties in Json

Hello together!

I need to save empty Custom Properties in the json file. If I leave these properties empty right now, Tiled won’t save the properties at all.

What I need is after saving the map:
“properties”:
{

},

I want to add a new feature to a mod from an existing game. The game will crash if there are no properties listed. Is there any solution to solve my problem? Thanks!

Hmm, right the properties are left out when empty since Tiled 0.16. In any case there is no option for including them anyway and I think the use-case is rather rare so I don’t really want to add such an option.

One solution is to pick an older version of Tiled. Tiled 0.15.2 should work fine for you.

What you can do alternatively is to write a small tool that will load up the JSON, add those empty properties values and write it back to JSON. Since JSON is so widely supported you should be able to write such a thing pretty quickly in any language.

Oh ok. I will try v0.15.2 then. Thanks for your reply!