kdl-org / kdl

the kdl document language specifications
https://kdl.dev
Other
1.09k stars 61 forks source link

Make JSON-in-KDL more minimalistic #293

Closed bgotink closed 1 year ago

bgotink commented 1 year ago

This PR applies the new JiK microsyntax proposed in #281. Instead of explicitly requiring (array) and (object) tags as proposed in the OP, the heuristic described in https://github.com/kdl-org/kdl/issues/281#issuecomment-1215058690 is applied to detect the correct type while allowing the tags to be used in two cases where ambiguities arise.

In my comment https://github.com/kdl-org/kdl/issues/281#issuecomment-1215058690 I also proposed ditching the requirement for a single top-level node, but that would limit JiK to encode only JSON arrays and objects while also making it impossible to encode a JSON stream, so I did not apply that here.

Closes #281

tabatkins commented 1 year ago

Very nice, I like what's going on here a lot better.

LemmaEOF commented 1 year ago

🎉🎉🎉