Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was looking for a human-friendly format to store data for a staticly generated website. Stuff like copy, lists, addresses, contact information (so that the rendering logic is kept separate).

Landed on NestedText, and apart from it having few implementations, I loved it! https://nestedtext.org/en/stable/

I did feel like I missed a more popular alternative, because I can't be the only one to want a human-friendly data format.



I'm a huge fan of NestedText, especially as there is no escaping needed ever.

If you ever want to use it as a pre-format to generate either TOML, JSON, or YAML, I used the official reference implementation to make a CLI converter between them and NestedText.

When generating one of these formats, you can use yamlpath queries to concisely but explicitly apply supported types to data elements.

- My CLI converter: https://github.com/AndydeCleyre/nestedtextto

- yamlpath info: https://github.com/wwkimball/yamlpath/wiki/Search-Expression...


Wow, that's really versatile! Thanks for sharing! `json2nt` seems like a great alternative to `jq .` for pretty printing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: