- schema
- $schema
- JsonSchema
- JSONschema
[
'red',
'blue',
'green'
]
- A
["red", "blue", "green"]
- B
["red", "blue", "green"]
- C
{
"color": "red",
"color": "blue",
"color": "green"
}
- D
{
"red": "red",
"blue": "blue"
}
- JSON.parse()
- JSON.stringify()
- JSON.toString()
- JSON.objectify()
- string
- number
- date
- array
- unpacking
- serialization
- deserialization
- parsing
accountNum: '000605802'
- "accountNum": "000605802"
- accountNum: "000605802"
- "accountNum": 000605802
- accountNum: 000605802
Q7. What character do you specify before a JSON control character when you want to use that control characters as a literal part of a string?
-
/
-
\
-
:
-
{
- Boolean
- map
- promise
- function
- important
- base
- core
- required
{
photo: {
width: 1600,
height: 900,
binaries: {
url: 'https://www.example.com/images/34097349843',
thumbnail: 'https://www.example.com/images/thumbs/34097349843'
},
animated: false,
tags: [116, 943, 234, 38793],
}
}
- A
{
"photo": {
"width": 1600,
"height": 900,
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": "false",
"tags": [116, 943, 234, 38793]
}
}
- B
{
"photo": {
"width": 1600,
"height": 900,
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": false,
"tags": [116, 943, 234, 38793]
}
}
- C
{
"photo": {
"width": 1600,
"height": 900,
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": false,
"tags": [116, 943, 234, 38793]
}
}
- D
{
"photo": {
"width": "1600",
"height": "900",
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": "false",
"tags": ["116", "943", "234", "38793"]
}
}
- Escape all whitespaces expect space characters.
- Escape line breaks.
- Escape paragraphs.
- Remove all whitespaces
loggedIn: true
- string
- Boolean
- number
- object
Q13. If you need to store the loggedIn status of a user in JSON as a boolean, what is the correct syntax?
- "loggedIn": (true)
- loggedIn: "true"
- "loggedIn": true
- loggedIn: {true}
- an
<origin>
element - a header request
- the
<script>
element - the XMLHttpRequest object
- undefined
- infinity
- NaN
- null
- JSON.parse()
- JSON.stringify()
- JSON.toString()
- JSON.objectify()
Q17. Transferring JSON information from client to server and back again often includes HTTP requests. Match each method with the best choice describing its use.
1.Sends data to specific server to create or update information.
2.Sends data to specific server to create or update information without the risk of creating the resource more than once.
3.Previews what the GET request response might be without the body of the text.
4.Learns the communication channels used by the target source.
5.Requests information from a specific source.
6.Removes information.
- 1.POST 2.DELETE 3.OPTIONS 4.HEADER 5.GET 6.PUT
- 1.POST 2.PUT 3.HEADER 4.OPTIONS 5.GET 6.DELETE
- A
{
"host": "Atlanta",
"year": 1996
/_ Centennial Olympics _/
}
- B
{
"host": "Atlanta",
"year": 1996
// Centennial Olympics
}
- C
{
"host": "Atlanta",
"year": 1996,
"comment": "Centennial Olympics"
}
- D
{
"host": "Atlanta",
"year": 1996,
\"Centennial Olympics\"
}
- E
{
"host": "Atlanta",
"year": 1996,
"comment": "\"Centennial Olympics"
}
- yes
- only if there is more than one item
- no
- only when arrays and objects contain more than 10 items
Reference Explanation: Trailing commas can be used in objects and arrays.
- All whitespace is allowed.
- double quotes, slashes new lines, and carriage returns
- new lines and carriage returns only
- double quotes only
- nested
- comments
- arrays
- null values
-
"'|=(_)(X 72(_)|\/||\*'"
-
"|=(_)(X 72(_)|\/||\*"
-
"|=(_)(X\" \"72(_)|\/||\*"
-
"\s(_)(X 72(_)|\/||\*"
- Convert the date to UTC and enclose in quotes.
- Encode the date as string using the ISO-8601 date format.
- Wrap the date in double quotes.
- Add a "date" key to your object and include the date as string.
JSON.parse({"first": "Sarah", "last": "Connor"}) ;
- JSON should be wrapped with curly braces.
- JSON.parse() is missing an argument.
- The value supplied to JSON.parse() is not a string.
- Nothing is wrong with it.
printNullness(JSON.parse('{ "lemmings": [] }'));
printNullness(JSON.parse('{ "lemmings": null }'));
printNullness(JSON.parse('{ "lemmings": "null" }'));
function printNullness(testMe) {
if (testMe.lemmings == null) console.log('null');
else console.log('not null');
}
- A
not null
null
not null
- B
null
null
not null
- C
not null
null
null
- D
null
null
null
- JSONLint
- ValidateJSON
- JSONFiddle
- TextEdit
- double quotes
- smart (curly) quotes
- single or double quotes
- single quotes
Q28. Which code is a valid JSON equivalent of the key/value pair shown that also preserves the data type? constant: 6.022E23
-
"constant": "6.022E23"
-
"constant": "6\.022\E23"
-
"constant": 6.022E23
-
constant: "6.022E23"
Reference Explanation: Scientific Notation is a valid JSON number. You can use e
or E
.
-
<object>
-
<script>
-
<json>
-
<meta>
- Because it's object-based.
- Because it's a simple and adaptable format for sharing data.
- Because it's based on JavaScript.
- Because it is derived from SGML.
Q31. You need to assemble a list of members, but your JSON is not parsing correctly. How do you change it?
{
"avengers": [
"iron man",
"hulk",
"thor",
"black widow",
"ant man",
"spider man'
]
}
- A
{
"avengers": ["iron man", "hulk", "thor", "black widow", "ant man", "spider man"]
}
- B
{
'avengers': [
{'iron man',
'hulk',
'thor',
'black widow',
'ant man',
'spider man'}
]
}
- C
{
"avengers": ["iron man", "hulk", "thor", "black widow", "ant man", "spider man"]
}
- D
{
"avengers": {[
"iron man",
"hulk",
"thor",
"black widow",
"ant man",
"spider man"
]}
}
Q32. When building dynamic web applications using AJAX, developers originally used the _ data format, which has since been replaced by JSON.
- XML
- GRAPHQL
- REST
- SOAP
- TRUE
- "true"
- 1
- true
- ['tatooine', 'hoth', 'dagobah']
- [tatooine, hoth, dagobah]
- ["tatooine", "hoth", "dagobah",]
- ["tatooine", "hoth", "dagobah"]
[
{
"year": 2024
},
{
"location": "unknown"
}
]
- object
- array
- number
- string
- trailing commas
- trailing decimals
- whitespace
- leading zeroes
Q37. When you need to set the value of a key in JSON to be blank, what is the correct syntax for the empty value?
- FALSE
- 0
- ""
- null
- Escape the number with a backslash.
- Enclose the number in double quotes.
- Enclose the number in single quotes.
- Leave the number as is.
- "lastVisit": null
- lastVisit: null
- "lastVisit": 0
- "lastVisit": undefined
- 128514
- d83dde02
- \uD83D\uDE02
- 😂
- "largest": "blue whale"
- largest: 'blue whale'
- 'largest': 'blue whale'
- largest: "blue whale"
- data
- schemadata
- schematype
- type
Q43. Which code is a valid JSON equivalent of the key/value pair shown that also preserves the original value?
- "UPC": \043875
- UPC: "043875"
- "UPC": 043875
- UPC: '043875'
- markdown
- YAML
- XML
- JSON
Q45. Which code is valid JSON equivalent of the key/value pair shown that also preserves the data type?
- "variance": -0.0823
- variance: "-0.0823"
- "variance": "-0.0823"
- variance: -0.0823
- colon
- space
- semicolon
- comma
- :
- ->
- ::
- .
- Wrap line breaks in single quotation marks
- Make no changes, because whitespace is allowed
- Replace any line breaks with
\r
- Replace any line breaks with
\n
- Fractional and Transcendental
- Infinity or Rational
- Rational and Irrational
- Infinity or NaN
- As a string with quotes
- As a string without quotes
- As a string in ISO 8583 format
- As a string in ISO 8601 format
- No, emojis must be escaped with a backslash.
- No, JSON strings are not allowed to use emojis.
- No, emojis should never be enclosed with double quotes.
- Yes, emojis are valid characters because JSON strings are unicode.
- list
- array
- struct
- indexed hash
- arrays, strings, numbers, true/false
- hashes, arrays, strings, numbers, booleans, null
- arrays, objects, lists, strings, numbers, booleans
- objects, arrays, strings, numbers, booleans, null
- key: "value"
- "key": "value"
- key, "value"
- 'key': 'value'
{
"result": [
{
"year": 2024
},
{
"location": "unknown"
}
]
}
- number
- array
- string
- object
{
"series": "Star Trek",
"episodes": "The Trouble with Tribbles"
}
- Key/value pairs should be separated by semicolons.
- Keys should be enclosed with double quotes.
- Key/value pairs should always have a trailing comma.
- Keys and values should be enclosed with single quotes.
- Wrap the comments in single quotes and place it at the bottom of the file.
- Wrap the comments in double parentheses.
- Escape comments by placing two slashes at the start of the comment.
- JSON does not support comments.
"name": 'bb-8'
- name: "bb-8"
- "name": 'bb-8'
- "name": "bb-8"
- "name": bb-8
- with brackets
- with colons
- with commas
- with parentheses
- any language, as JSON is language agnostic.
- Ruby
- JavaScript
- Python
- only numbers
- any valid JSON value
- only strings and numbers
- only strings
- reserialization
- nesting
- memorization
- minimization
-
[]
-
{}
-
""
-
()
- text/json
- text/javascript
- application/json
- data/json
- /
- "
- -
- :
- to provide a simple way to serialize and deserialize data between different sources
- to provide a way to store data for machine learning
- to provide an archival solution for data warehousing
- to provide a way for JavaScript to run other languages
- No, but you can sort the keys with
JSON.sort()
. - Yes, object keys are always ordered alphabetically.
- Yes, but only when the object is first parsed.
- No, you can never assume object keys will be in order.
-
*
-
#
-
^
-
"
- 10,000
- 1000
- There is no defined limit.
- 1 million
- a swarm
- multiple resources
- a collection
- a group
- yes, but only if they are enclosed in quotes
- only with integers
- no
- yes
- dash and dot
- dash and comma
- comma and exclamation point
- dot and comma
- JSON.ingest()
- JSON.convert()
- JSON.read()
- JSON.parse()
- with right arrows
- with colons
- with semicolons
- with commas
- zero
- one
- two
- three
- arrays; objects
- objects; functions
- arrays; functions
- key/value pairs; arrays
- true, false, null
- true, false
- TRUE, FALSE, NULL
- Remove spaces from the key before accessing the value.
- Use dot notation to access the value.
- Use object key index to access the value.
- Use bracket notation to access the value.
- remove duplicate data from a server
- temporarily store data for faster access
- store excess information in chunks to be reviewed later
- clog up a web browser with useless information
Q80. What is the only valid whitespace character within a string that does not require an escape character?
- line break
- space
- tab
- return
- Store the number as a string
- Convert the number into an exponent.
- Round the number to the nearest 10-digit number.
- Split the number into smaller parts.
Q82. Which code is a valid JSON equivalent of the key/value pair shown that also preserves the data type?
variance: -0.0823
- variance: "-0.0823"
- variance: -0.0823
- "variance": "-0.0823"
- "variance": "-0.0823"
Q83. Based on the JSON object shown, which JavaScript code would you use to find out what is in this vehicle's glove box while assigning the glove box contents to a new variable?
myVehicleContents = {
van: {
inside: {
'glove box': 'maps',
'passenger seat': 'crumbs',
},
exterior: {
trunk: 'jack',
},
},
};
- A
myVehicleContents.van.inside['glove box'] = gloveBoxContents;
- B
var gloveBoxContents = myVehicleContents.van.inside['glove box'];
gloveBoxContents;
- C
var gloveBoxContents = myVehicleContents.van.glove box.contents;
gloveBoxContents;
- D
myVehicleContents.van.inside['inside'] = gloveBoxContents;
- ||
- {}
- ()
- []
Q85. The JSON structure features nested objects and arrays. Sometimes the data containing these features exists in relational databases. How is the relational structure different that JSON?
- It has a flat architecture.
- It has a rewritable structure.
- It has an array-only structure.
- It has a table structure.
- arrays
- null values
- comments
- nested
YAML supports # comments but not JSON
-
"'|=(_)(X 72(_)|\/||*'"
-
"\s(_)(X 72(_)|\/||*"
-
"|=(_)(X\" \"72(_)|\/||*"
-
"|=(_)(X 72(_)|\/||*"
{"rey",'leia',"ashoka",}
-
['rey', 'leia', "ashoka",}
-
['rey', 'leia', 'ashoka',}
-
["rey", "leia", "ashoka"]
-
{"rey", "leia", "ashoka"}
- zero or more digits
- one or more digits
- a period
- a dollar sign
{
"students": ["Tess", "Erin", "June"]
}
- Convert each student to an object, then add key/value paris to each student object as needed.
- Add additional name/value pairs, separated by commas, after "students".
- Convert each student into an array and add extra elements to the array.
- Wrap the existing "students" key with curly braces.
-
99999999999999999999
-
"42"
-
-32
-
1111.00.110011
- 512 characters
- There is no defined limit.
- 2,056 characters
- 1,024 characters
-
JSON.convert()
-
JSON.stringify()
-
JSON.export()
-
JSON.string()
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": false
}
- A
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": true,
"seeking": "part-time"
}
- B
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": "true",
"seeking": "part-time"
}
- C
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": false,
"seeking": "part-time"
}
- D
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": "true",
"seeking": "part-time"
}
Hint: true needs to be a boolean and part-time a string so in double quotes.