Skip to content

cute_tiled: Fix failure to load when objects have a 'propertytype' JSON field. - #439

Open
fsb-dev02 wants to merge 1 commit into
RandyGaul:masterfrom
fsb-dev02:master
Open

cute_tiled: Fix failure to load when objects have a 'propertytype' JSON field.#439
fsb-dev02 wants to merge 1 commit into
RandyGaul:masterfrom
fsb-dev02:master

Conversation

@fsb-dev02

@fsb-dev02 fsb-dev02 commented Jul 28, 2026

Copy link
Copy Markdown

This PR prevents a JSON parsing error when loading a map where one or more Tiled objects contained in it make use of a custom enum type. The parsing error happens because from Tiled 1.8 onwards, a new field "propertytype" was added in their JSON specifications (which defines the enum name), which cute_tiled does not currently account for and fails when encountering it. The changes make it so that cute_tiled will skip this propertytype field during parsing and read a custom enum as a normal int or string.

Below is a copy of the map from my project where i tested this:
rock_mnt.json

@RandyGaul

Copy link
Copy Markdown
Owner

Is this backwards compatible?

@fsb-dev02

Copy link
Copy Markdown
Author

Is this backwards compatible?

Yes, parsing simply continues as usual if there isn't a "propertytype" field to skip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants