JSON Syntax Flashcards
The JSON syntax is a subset of the _______ syntax.
JavaScript
The JSON syntax is a subset of the _______ syntax.
JavaScript
JSON data is written as ____/____ pairs
name/value
JSON data is separated by ______.
commas
______ _____ hold JSON objects.
curly braces
_____ _____ hold arrays.
square brackets
JSON can be parsed by a ______ ______ function.
standard javascript. JSON is parsed into a ready-to-use JavaScript object
T or F: JSON doesn’t use end tag.
True
_____ is much more difficult to parse than _____.
XML, JSON
What are the three data types JSON values cannot be?
- function
- date
- undefined
JavaScripts keys must be in _____ ____.
double qoutes
When sending to a web server, the data is has to be a _____.
string
What do you have to do to the data to change it to a JS object?
parse the data
Parse the data with ________, and the data becomes a JavaScript object.
JSON.parse()
You can request JSON from the server by using an _____ request.
AJAX
_____ objects are not allowed in JSON.
Date
What is the reviver parameter?
A function that checks each property, before returning the value.
Are functions allowed in JSON
No. But you may add a function in a string and convert it back into a function later.
(Avoid using functions in JSON tho)
How can you convert a JavaScript object into a string?
with JSON.stringigy()