Commit 305418d
fix: Object layer parsing for JSON format (#88)
# Description
When loading and parsing JSON Format, `objectGroup` layers wheren't
parsed correctly, which resulted in empty entry.
The main problem was that in JSON Format it is called "objects" instead
of "object" like in XML. Here is a snippet of a JSON file exported with
Tiled 1.8.2:
```json
"draworder":"topdown",
"id":8,
"name":"obj",
"objects":[
{
"height":8,
"id":1,
"name":"start",
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":64,
"y":160
},
{
"height":8,
"id":2,
"name":"gem",
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":96,
"y":40
},
```
## Breaking Change
- [ ] Yes, this is a breaking change.
- [X] No, this is *not* a breaking change.
---------
Co-authored-by: Lukas Klingsbo <me@lukas.fyi>1 parent 4a664be commit 305418d
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments