I have only developed the "stringify" mechanism, not yet the "parse" mechanism. I might also get around to costume and sound support (I took maybe every single type including "nothing" and "selector" into consideration, but these two), as well as handling circular lists.
I developed that because I really loathe JSON for being so overly stringent despite being a popular choice for data serialization. Not only you need to quote your keys, but you also cannot use ' (apostrophes) as a substitution for " (quotation marks). JSON's necessity for quotation marks incentivized me to be lenient with omitting quotation marks (unless there is potentially conflicting syntax).
My immediate reaction is that the benefits of being able to edit Snap! projects in any old third-party JSON (or XML) editor outweigh any minor virtues to your syntax. You’d do better to get them to change the JSON rules!
Sprites would be looked up by name. If there is no sprite with such name, ...you get the idea.
I could number clones that are unnamed, and assign it to the parent sprite.
By the way, this is a human-readable data serialization format, not a full-fledged raw data format that holds all the data for a sprite within one object.
Here’s what comes to mind:
ROSS format: “Readability Oriented Snap Serialization format”
or, just for fun:
JINJOTS: “JINJOTS Is Not JSON Oriented Towards Snap”
More on JINJOTS
We can expand further:
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
“JINJOTS Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap Is Not JSON Oriented Towards Snap”
TISNAGN… (TISNAGN is not a good name..) (T = That in the first-first version inside billions of TISNAGNs)
Gives WINE (Wine is not a emulator) vibes
I think the ROSS name is better, its shorter. JIN-JOTS? Is that how you’ll pronounce it?
Or maybe remove the “JIN” and keep “JOTS”, that might work also
Serialization for the trivial scalar values is … hmm, trivial.
The hardest part is serializing complex structures. If you already understand the script format, standard objects may be referenced consistently by an expression => (object mySprite) => (colorFrom “rgba(145,26,68,1)”) => (my [stage])
Also, there should be a simple, fast type hint to call the appropriate deserialization code.
I do not expect my data serialization format to make an appearance in professional use. I just started this project for fun, as well as to deal with my hatred for JSON and its ubiquitousness, which I find its syntax strictness inane.
I read a JSON file that has not been prettified to be readable, so everything is on one line. All these quotes are wasting space.
What do you mean by "slightly"? I cannot stand it... all the quoting needed. I do not know anyone who wants mandatory quoted keys in a language with barely any special syntax, just four literal types and two object types.
I prefer to have my own format. The only part that I am borrowing from is scripts, which I am borrowing from Snap!'s Lisp.