TJSON for GameMaker
Quick links: Blog post · Marketplace · Documentation
Note: This extension has been made mostly-redundant in GMS≥2.3.1 with introduction of json_parse and json_stringify, which allow [de-]serialization of structs.
TJSON is an extension for GMS1 and GMS2 that offers an improved set of functions for dealing with JSON.
- Automatic memory management - no need to explicitly free the produced structures (more on memory).
- Type information - easily tell apart data in loaded JSON (more on types)
- Convenience - if you load a JSON string that has a top-level array, you get an array. If the JSON string is just a numeric value, you get that. No odd maps with "default" values (more on decoding).
- JS boolean value support - GML uses 1 and 0 as true and false values, so it is impossible to distinguish JSON true/false values in resulting data or produce a true/false value in encoded string. TJSON fixes that (more on boolean values)
- [GMS2.3] Encode and decode nested structs and arrays for maximum convenience (more on the update)
Shown demo loads arbitrary JSON from a string and displays it with all according nesting.
|Made with||GameMaker: Studio|
|Tags||example, extension, GameMaker|
In order to download this extension you must purchase it at or above the minimum price of $3.95 USD. You will get access to the following files:
- 1.0.6 - GMS2.3 minifixesAug 19, 2020
- 1.0.5 - a GMS2.3 versionApr 28, 2020
- 1.0.4 - GMS2 fixesSep 12, 2019
- 1.0.3 - small fixesMar 26, 2019