I think I have solved how to structure visible and hidden data in #Djot npub16nhe0zge4j7pceqakxenjtapnlrcdgg8pcx3fzthp82cj0cpnqtqzvtnnq (npub16nh…tnnq)
The lists that uses ":" instead of - or * are called "definitions" in Djot and could be used for sections' properties.
By looking at the AST, it should be easy to parse it and in general convert between a structured data format like JSON and this one.