{
"color": "red",
"count": 2
}JSON to SQL expects an array of objects and writes one INSERT. [{"Item":"Notebook","Quantity":12},{"Item":"Pen","Quantity":4}] with table name records becomes INSERT INTO "records" ("Item", "Quantity") VALUES\n('Notebook', 12),\n('Pen', 4);. There is no CREATE TABLE. If you need the table statement and the type guess, start from CSV on the other page.
Keys are the column list, in the order they are collected from the objects. A later object that lacks a key gets NULL in that position. Strings are single-quoted with quotes doubled. Numbers and booleans are bare, booleans written TRUE or FALSE. A JSON object that is not an array, or an empty array, is an error.
The INSERT builder on the next page runs the same statement shape. Use this one when the document already exists as JSON. Use the builder when you are typing seed rows. Neither page offers a MySQL or SQL Server dialect: quoting is double quotes for identifiers.
Table name records. [{"Item":"Notebook","Quantity":12},{"Item":"Pen","Quantity":4}]
INSERT INTO "records" ("Item", "Quantity") VALUES\n('Notebook', 12),\n('Pen', 4);
No CREATE TABLE, on purpose. The CSV page is the one that invents column types and a table.
This page only inserts. CSV to SQL writes CREATE TABLE and infers TEXT or NUMERIC. If the table exists, you do not want a second definition.
That column is NULL for that row. Keys are not limited to the first object.
The same INSERT shape is what the SQL INSERT builder produces. A one-element array is enough on either page.
No. They are double quotes. That suits PostgreSQL and SQLite. MySQL needs ANSI_QUOTES or a manual edit.