Reputation: 8876
I'm looking for a configuration file format with a schema. Something simple like YAML, but has a schema like XSD does for XML. Does this exist?
XML is a better serialization format than it is a configuration format but combined with XSD, it makes a powerful self-documenting configuration format.
Thanks!
Upvotes: 0
Views: 543
Reputation: 85
My go to choice for Python is NestedText combined with Voluptuous.
NestedText is the configuration file format. It looks similar to YAML, but is simpler and has none of the ambiguities that plague YAML.
Voluptuous is the schema package.
Upvotes: 1
Reputation: 2244
One answer is Config4*. I recommend you read Chapter 2 (overview of the configuration syntax) and Chapter 3 (overview of the C++/Java API and overview of the schema language) of the Config4* Getting Started Guide to learn enough to decide if it suits your needs. Disclosure: I developed Config4*.
Another answer is Json, which now has its own schema language. I haven't used it, so I can't comment on its merits.
Upvotes: 1