gavo.formats.jsontable module

Writing tables in JSON.

We use python’s built-in json engine to write an – as yet – ad-hoc json format that essentially looks like this:

{
        "contains": "table",
        "columns": { (column metadata more or less as in VOTable) }
        "data": { (rows as tuples) }
        ("warnings": [...])
}

No streaming at all is forseen for this format at this point.

class gavo.formats.jsontable.JSONMetaBuilder(jsonStructure)[source]

Bases: gavo.base.meta.MetaBuilder

A MetaBuilder for mapping table meta information into our standard JSON structure.

enterValue(value)[source]
getResult()[source]
gavo.formats.jsontable.writeTableAsJSON(table, target, acquireSamples=False)[source]

writes table to the target in ad-hoc JSON.