JSON Syntax Flashcards

1
Q

The JSON syntax is a subset of the _______ syntax.

A

JavaScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The JSON syntax is a subset of the _______ syntax.

A

JavaScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

JSON data is written as ____/____ pairs

A

name/value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

JSON data is separated by ______.

A

commas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

______ _____ hold JSON objects.

A

curly braces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

_____ _____ hold arrays.

A

square brackets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

JSON can be parsed by a ______ ______ function.

A

standard javascript. JSON is parsed into a ready-to-use JavaScript object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

T or F: JSON doesn’t use end tag.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

_____ is much more difficult to parse than _____.

A

XML, JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the three data types JSON values cannot be?

A
  1. function
  2. date
  3. undefined
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

JavaScripts keys must be in _____ ____.

A

double qoutes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When sending to a web server, the data is has to be a _____.

A

string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What do you have to do to the data to change it to a JS object?

A

parse the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Parse the data with ________, and the data becomes a JavaScript object.

A

JSON.parse()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

You can request JSON from the server by using an _____ request.

A

AJAX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

_____ objects are not allowed in JSON.

A

Date

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the reviver parameter?

A

A function that checks each property, before returning the value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Are functions allowed in JSON

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How can you convert a JavaScript object into a string?

A

with JSON.stringigy()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Objects in PHP can be converted into JSON by using the PHP function _______.

A

json_encode()

21
Q

_____ is a method for sending JSON data without worrying about cross-domain issues.

A

JSONP

22
Q

JSONP does not use the ___________ object.

A

XMLHttpRequest

23
Q

JSONP uses the ______ tag.

A
24
Q

What does JSONP stand for?

A

JavaScript Object Notation with Padding

25
Q

Requesting a file from another domain can cause problems, due to ___________.

A

cross-domain policy.

26
Q

JSON data is written as ____/____ pairs

A

name/value

27
Q

JSON data is separated by ______.

A

commas

28
Q

______ _____ hold JSON objects.

A

curly braces

29
Q

_____ _____ hold arrays.

A

square brackets

30
Q

JSON can be parsed by a ______ ______ function.

A

standard javascript. JSON is parsed into a ready-to-use JavaScript object

31
Q

T or F: JSON doesn’t use end tag.

A

True

32
Q

_____ is much more difficult to parse than _____.

A

XML, JSON

33
Q

What are the three data types JSON values cannot be?

A
  1. function
  2. date
  3. undefined
34
Q

JavaScripts keys must be in _____ ____.

A

double qoutes

35
Q

When sending to a web server, the data is has to be a _____.

A

string

36
Q

What do you have to do to the data to change it to a JS object?

A

parse the data

37
Q

Parse the data with ________, and the data becomes a JavaScript object.

A

JSON.parse()

38
Q

You can request JSON from the server by using an _____ request.

A

AJAX

39
Q

_____ objects are not allowed in JSON.

A

Date

40
Q

What is the reviver parameter?

A

A function that checks each property, before returning the value.

41
Q

Are functions allowed in JSON

A

No. But you may add a function in a string and convert it back into a function later.
(Avoid using functions in JSON tho)

42
Q

How can you convert a JavaScript object into a string?

A

with JSON.stringigy()

43
Q

Objects in PHP can be converted into JSON by using the PHP function _______.

A

json_encode()

44
Q

_____ is a method for sending JSON data without worrying about cross-domain issues.

A

JSONP

45
Q

JSONP does not use the ___________ object.

A

XMLHttpRequest

46
Q

JSONP uses the ______ tag.

A
47
Q

What does JSONP stand for?

A

JavaScript Object Notation with Padding

48
Q

Requesting a file from another domain can cause problems, due to ___________.

A

cross-domain policy.