Berny23 / LD-ToyPad-Emulator

Toy Pad Emulator for Lego Dimensions (Unofficial Fan Project)
https://github.com/Berny23/LD-ToyPad-Emulator
MIT License
233 stars 41 forks source link

SyntaxError: Unexpected token } in JSON at position 18873 #134

Open farudel opened 1 year ago

farudel commented 1 year ago

Hi, how can fix this error? undefined:794 ] } ^

SyntaxError: Unexpected token } in JSON at position 18873 at JSON.parse () at initalizeToyTagsJSON (/home/farudel07/LD-ToyPad-Emulator/index.js:140:25) at Object. (/home/farudel07/LD-ToyPad-Emulator/index.js:27:1) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Function.Module.runMain (internal/modules/cjs/loader.js:877:12) at internal/main/run_main_module.js:21:11

cort1237 commented 1 year ago

There's a formatting error in the toytags.json file in "server/json/"

The entire JSON file is contained with a single set of square braces [], and each toytag data entry is contained inside by curly braces {}. For some reason the square braces closed before all the curly braces.

If you can share the file here, but you may be able to fix it yourself by just finding the misplaced square closing brace.

cort1237 commented 1 year ago

Or it may just be an unneeded } at the end of the file you can delete.