I would use a JSON parser to read and parse the JSON, and then use the JDBC API to insert the data into the database.
With the JDBC API, make sure you use PreparedStatement
, that means, create one PreparedStatement
per table, and re-use those. What you could do is keep them in a map, one prepared statement per table (Map<String, PreparedStatement>
).