3 ms·
After a quick look I have a lot of questions 1) Unlike YAML or JSON this doesn't parse into a simple array structure, but a library dependent object hierarchy?
by splitbrain 8y ago
After a quick look I have a lot of questions
1) Unlike YAML or JSON this doesn't parse into a simple array structure, but a library dependent object hierarchy?
2) Is the API of the libraries also part of the language spec?
3) Can I assume that document.lookup() will be available as document->lookup() in the PHP library?
4) What about programming language specifics that may differ between languages? Will the PHP objects implement the Iterable interface? Or the ArrayAccess interface? (There are probably similar but slightly different concepts in other languages).
5) There is eno.parse(), but is there some kind of reverse mechanism to create a new Eno document? Like document.addList([...]).addSection('hey', 2) or something.
- simonrepp 8y ago1) Yes! (You can directly dump it to a language-native structure with the raw() method too, this is not 1:1 YAML/TOML style generic deserialization though as there are no fixed types in eno) 2) Some detail aspects of whitespace-parsing around the line continuation syntax will need to be specified by the language, the shared official API I am implementing for the different platforms is fully open to improvement and future reinvention though, I'd love to see a completely new take for a library API if it comes up in the future. :) 3) Definitely! 4) I try to keep things as consistent as possible across the platforms, but if there are important language specific paradigms I think these should be taken advantage of! I can't answer details regarding the PHP implementation yet but keep in touch, I'm happy about a dialogue here! (Also I can't be good at everything :)). 5) I want one! Obviously there can't be a stable generic "just dump it already" implementation, but a smart builder-type API is definitely on the list, I even started one for enojs but had to re-prioritize because there was so much else to do for the whole ecosystem. ;)