Small PHP command line tool to import JSON data into database tables using transformation rules (templated SQL queries).
php json-import.php <options>
Omit the options to print the help / usage notice.
Have a look at the demo ruleset.
You would use this ruleset using php json-import.php import demo/test path/to/data.json
. An appropriate JSON data file would have to look like this:
[
{
"somevar": "hello world",
"somearray": [
{ "name": "somenumber", "value": 123.45 },
...
]
},
...
]
This software is released under the MIT license. See license.