JSOML: JavaScript Object Markup Language #54
Replies: 2 comments
-
Interesting approach. For some reason I was reminded of invisible XML, even though the two are completely different.
I see what you did there 😁 |
Beta Was this translation helpful? Give feedback.
-
@tarleb You'll probably find this pandoc template interesting. I use it with
In part, I do this because YAML indenting is too fragile (e.g. jgm/pandoc#8515). Currently, in my situation, those pandoc variables of HTML don't contain I also suspect JSOML might be appealing to people that really want to use XML. In other words, one could define some "schema" in terms of the primitive data structures of JSON/YAML but then let XML be one of multiple available textual serializations (along with JSON and YAML). This is very much in the spirit of and partly inspired by the AST of pandoc which is not tied to a specific text serialization format. |
Beta Was this translation helpful? Give feedback.
-
I'm sure this community has come to love and hate JSON, YAML and XML ... especially hating XML 😅. I solved a corner case with a hybrid of JSON and XML that you can find here:
https://gitlab.com/castedo/jsoml
I hope it might solve some other corner cases trying to interoperate between the XML and JSON/YAML worlds.
I've named it JSOML, perhaps prematurely. I hope it does not cause confusion with what I suspect is a little used format called JsonML If anybody has a better name please share.
JSON/YAML semantics are great for programming. But JSOML is much nicer for inspecting, diff-ing, and injecting large chunks of raw plain text inside structured data. This is thank to the CDATA feature of XML, arguably the only redeeming feature of JSOML. Apart from that benefit, JSOML is just a more bloated version of JSON 😅. YAML ain't bad, but I've hit annoying problems attempting this with YAML.
This JSOML library and format is backwards relative to the existing XML-to-JSON libraries and formats that I've found. JSOML is not transforming arbitrary XML into JSON, nor representing XML semantics in JSON. JSOML sticks to JSON/YAML semantics. It is XML in file syntax only.
I imagine this is an N-th re-invention of this idea. But I didn't find any existing libraries or formats that do this. If anybody knows of existing libraries or formats, please do share. I'm curious to see how others have done this.
Beta Was this translation helpful? Give feedback.
All reactions