
Answer-first summary for fast verification
Answer: To generate a schema that can be used to parse a JSON string into a struct.
The `schema_of_json` function is designed to generate a schema based on an example JSON string. This schema is then used by `FROM_JSON` to parse JSON strings into structs with the appropriate data types, ensuring accurate data representation and manipulation.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
What is the primary function of schema_of_json in SQL?
A
To validate the structure of a JSON string.
B
To create a new JSON string from a struct.
C
To generate a schema that can be used to parse a JSON string into a struct.
D
To compress the JSON data for storage efficiency.
No comments yet.