ldtk
ldtk copied to clipboard
[BUG] String fields of a number followed by the character "f" export as numbers in json output
String fields are normally exported such that the "__value" key is a JSON string.
{ "__identifier": "name", "__type": "String", "__value": "name", "__tile": null, ... },
When you input numbers followed by "f", however, "__value" is exported as a JSON number instead:
{ "__identifier": "name", "__type": "String", "__value": 0.0, "__tile": null, ... }
{ "__identifier": "name", "__type": "String", "__value": -100.0, "__tile": null, ... }
Here's a particularly odd one:
{ "__identifier": "name", "__type": "String", "__value": 10.0, "__tile": null, ... }
Numbers without an "f" are exported as strings.
{ "__identifier": "name", "__type": "String", "__value": "1000", "__tile": null, ... }
And if the number is invalid, it is also exported as a string.
{ "__identifier": "name", "__type": "String", "__value": "1g0f", "__tile": null, ... }
This doesn't seem like intended behavior. I believe most people would expect that the LDTK string data type would export as a JSON string.