pythondata-formats

What data format is that? And how to parse it (python)?


Games from Valve use following data format

"name1"
{
    "name2"  "value2"
    "name3"
    {
        "name4" "value4"
    }
}

Does this format have a name or is it just self made?

Can I parse it in python?


Solution

  • I'm not sure that it has a name, but it seems very straightforward: a node consists of a key and either a value or a set of values that are themselves either plain strings or sets of key-value pairs. It would be trivial to parse recursively, and maps cleanly to a structure of nested python dictionaries.