This is a pretty interesting approach, and it doesn't seem to be tied to any particular database implementation.
Would it be possible to factor this up into a JSON -> SQL translation function, which could than be used by various backends (effectively consume the JSON and spit out the CREATE TABLE and INSERT statements)?