json_stringify and json_parse - Using Structs with JSON - GameMaker Tutorial

preview_player
Показать описание
Back in September I made a video about an extension that converts structs to and from JSON, as well as a few other things. There is now a smilar feature built into GML itself! (SNAP still has its uses if you want to be able to use other file formats, such as XML or YAML.)

This video was made as an addendum to the SNAP video, but at this point it may be worth it to make something that's entirely about JSON itself.

Struct 'n' Array Parser:

Other recent struct additions:

Code:

GameMaker Studio 2.3 doesn't have a built-in way to save and load structs. Fortunately, someone else has made an extension for that!

#GameMaker
#GameMakerTutorial
#GameMakerStructs
- - - - -
I've now made that Patreon:
That promised social media link spam.
Transition / idle music is by my old friend Kamex:

Rate, comment, subscribe, watch more, enjoy!
Рекомендации по теме
Комментарии
Автор

As you stated. building JSON in GMS2 has always been clunky requiring a combination of list and map struct functions. Now json_stringify makes this much easier. Thanks.

realistindenial