Closed mbredif closed 7 years ago
Also, it would be good to add a test file and have test.sh import it.
I added import-json to test.sh and took into account minor comments. I am not sure what is the right thing to do for the encoding and isoformat remarks.
This PR adds a new entrypoint to import json files that already follow the li3ds data model. The json structure must be a dictionary that maps object types to an array of JSON objects. The only specificity is that ids (both definitions and references) are for now local to the json file, so that li3ds objects with a imported json file may reference each other. These local ids are not preserved once the objects are imported in the database and neither can they reference ids of object that are already in the database.
The rationale of this PR is to enable to insert data within the li3ds database directly (ie without converting from any other datamodel).