I posted this under shared code a while ago, but I have been using this for real stuff for around a year now, so I decided to make it a real project.
TreeML is a YAML-like, JSON-like structured document language. It parses tab-indented files into trees of nodes. It supports lists, integers, floats, booleans, strings, tokens and explicit nulls.
How does it differ from YAML? It has a LOT less features and and the parser is one class. It also uses tabs and and doesn’t support arbitrary indentation levels.
How does it differ from JSON? It uses curly brackets or indentation for nesting, and doesn’t force you to use quotes around string tokens. It also allows repeated keys in maps (which, by extension, are not maps). It has a schema language.
Some notes about TreeML best practices:
-
Don’t use it for operating a nuclear facility.
-
It may or may not work. So far it seems to work for me.
WIP posts need a picture, so here is a picture of the Christmas Tree Nebula:
It’s not my picture, credit goes to: http://www.guidescope.net/nebulae/cone.htm
I have decided I need a schema language to keep my huge Vangard asset files sane, so I’m working an adding ultra-lightweight schema support.
Sources: