-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json tile map parsing null #65
Comments
No idea, can you check who wrote that line and we can tag them? :) |
@luanpotter The blame gods have mentioned your name. |
There's very limited documentation or testing of the parser code. Flame-engine only deals with XML files, so this looks like an oversite. Tiled Map Editor does document this field as being either a list of ints or base64 encoded for JSON. There is no example of this in their codebase (or I'm just bad at search this early in the morning) but the XML format has the documentation for why there's a compression/encoding field. In JSON format:
and
Further down in this code we call "parseLayerData" - but since this will ALWAYS be null for json, it'll never actually attempt to parse it. This file needs a little love and testing. |
Probably an oversight on my part. I think i didn't have many/any JSON examples and thought that field was not set for the JSON format. Def open to PRs! |
tiled.dart/packages/tiled/lib/src/layer.dart
Line 144 in d71d0c8
Is this line supposed to return null? This seems to make tileData for the layer be null, causing a null assertion failure in flame_tiled that assumes tileData is not null.
The text was updated successfully, but these errors were encountered: