Insert a simple JSON
suggest changeINSERT INTO
table_name (json_col)
VALUES
('{"City": "Galle", "Description": "Best damn city in the world"}');
JSON object keys must be double-quoted, so wrap the literal in single quotes. MySQL parses it and stores the JSON type in a binary form, not as the original text. Invalid JSON is rejected.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents