-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/13/2015 08:00 PM, Hayden Livingston wrote: > Does your code also map object hierarchies in json?
Yes, but thankfully I don't have much of them. Essentially the top level of the object has a unique id (SQLite allocated), and then other tables are used to join zero or more child objects to the top level. > What general format do you use? Ultimately I use Python dictionaries which are supersets of JSON objects. Some (ugly) code can convert both ways > Each object type gets stored in a separate table? In my case yes but that is because the underlying data represents known entities and was actually originally in Postgres and then exported to hideous inconsistent XML which I then convert/denormalise back into JSON. Do remember that SQLite does not require you to specify a type for each column, nor does it care about the values in a column being different types between rows. That means I don't have to worry about types, only the big picture top level of something being an object, a list, or a scalar. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlWkg0MACgkQmOOfHg372QRTbQCfRobbh4uU1Eqf0SD9LJxABFYj iv8AoKUvXNQEgGVvmPiZ/tQgHyU7Q0yL =S7AM -----END PGP SIGNATURE-----