3 ms·
YAML and JSON already represent object graphs. This appears to be essentially a config file editor, not a superior configuration format. It has a GUI for creati
by chc 8y ago
YAML and JSON already represent object graphs. This appears to be essentially a config file editor, not a superior configuration format. It has a GUI for creating or editing a config, and then it outputs YAML or JSON or XML.
- wruza 8y agoTrees are not graphs. You have to un-circularize your objects before stringifying.
- chc 8y agoIt's true that you need to remove cycles before you can create a tree, but acyclic graphs are still graphs (and most relevantly they're probably the kind of graph you want your config to be). And YAML actually can contain cycles, so even if you only want to consider cyclic graphs, YAML still qualifies.
- wruza 8y agoYes, that’s what I meant.
- user5994461 8y agoTrees are always graphs. A tree is a an acyclic graph with a node designated as root.
- frutiger 8y agoYou can have unrooted trees. See the second paragraph at https://en.wikipedia.org/wiki/Tree_(graph_theory)#Rooted_tree https://en.wikipedia.org/wiki/Tree_(graph_theory)#Rooted_tre....
- Edmond 8y agoIt can be hard to fully convey how ConfigNode works without actually showing it in action. Yes it does give you a UI environment to edit the object graph and outputs YAML/JSON/XML..etc. However the output comes after evaluating the object graph. In other words it doesn't just reassemble a bunch of static values but rather actually executes objects (think POJOs) to produce the fields that make up each object.