Package gavo :: Package formats :: Module jsontable
[frames] | no frames]

Module jsontable

source code


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.

Classes
  JSONMetaBuilder
A MetaBuilder for mapping table meta information into our standard JSON structure.
Functions
 
writeTableAsJSON(table, target, acquireSamples=False)
writes table to the target in ad-hoc JSON.
source code
Variables
  __package__ = 'gavo.formats'