6
JSON and Non-JSON Output
The advantages of traditional relational data and schemaless data are both large. But in some cases, data in a schema needs to be schemaless, or schemaless data needs to be in a schema. Making such changes is easy to do.
JSON-Formatted Data
The various JSON functions supplied by MySQL can also be used to create JSON-formatted output from non-JSON data. Example 6-1 shows non-JSON data output in a non-JSON format, which has been the standard for MySQL for much of its existence.
Example 6-1 Non-JSON data and output from a relational table
This is a fairly typical example of MySQL output for a regular query—good-old ...
Get MySQL and JSON: A Practical Programming Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.