Quick links: Blog post · Marketplace · Documentation

TJSON is an extension for GMS1 and GMS2 that offers an improved set of functions for dealing with JSON.

Advantages include:

  • 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)

The extension is compatible with all modules. Native platforms make extensive use of buffers to maximize performance. JavaScript-based platforms make use of browser's/system's functionality.

Shown demo loads arbitrary JSON from a string and displays it with all according nesting.

Updated 15 days ago
StatusReleased
CategoryAssets
Rating
(2)
AuthorYellowAfterlife
Made withGameMaker: Studio
Tagsexample, extension, GameMaker

Purchase

Buy Now$3.95 USD or more

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:

tjson_gms1.gmez 15 kB
tjson_gms2.yymp 12 kB
TJSON-for-GMS2.3.zip 5 kB

Development log