Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
yamlpath
YAML/JSON/EYAML/Compatible get/set/merge/validate/scan/convert/diff processors using powerful, intuitive, command-line friendly syntax.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Upvote for the shoutout to Nix
That's why you pick a superset of JSON that already has some adoption, like JSON5: https://spec.json5.org/
The example you linked provides this as an example of a YAML document that he wants his format to support.
I've not done it myself, but I think it has many ways to sandbox it. There is even a pure Lua sandbox that can block infinite loops.
I used the official reference implementation to make a CLI converter between NestedText and TOML, JSON, and YAML. When generating one of these formats, you can use yamlpath queries to concisely but explicitly apply supported types to data elements.
I used the official reference implementation to make a CLI converter between NestedText and TOML, JSON, and YAML. When generating one of these formats, you can use yamlpath queries to concisely but explicitly apply supported types to data elements.
As /u/astatine said, an excellent but under-recognized alternative syntax for configuration files is NestedText, where everything is a string unless the ingesting code says otherwise, and there is no escaping needed ever.