- schema
- $schema
- JsonSchema
- JSONschema
- [ ]
[
'red',
'blue',
'green'
]
- [ ]
[
"red",
"blue",
"green"
]
- [x]
{
"color": "red",
"color": "blue",
"color": "green"
}
- [ ]
{
'red': 'red',
'blue': 'blue',
}
- JSON.parse()
- JSON.stringify()
- JSON.toString()
- JSON.objectify()
- string
- number
- date
- array
- unpacking
- serialization
- deserialization
- parsing
accountNum: '000605802'
- "accountNum": "00060504"
- accountNum: "00060504"
- "accountNum": 00060504
- accountNum: 00060504
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],
}
}
- [ ]
{
'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],
}
}
- [ ]
{
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],
}
}
- [ ]
{
"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],
}
}
- [x]
{
"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 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
- 1.POST 2.DELETE 3.OPTIONS 4.HEADER 5.GET 6.PUT
- 1.POST 2.PUT 3.HEADER 4.OPTIONS 5.GET 6.DELETE
- [ ]
{
"host": "Atlanta",
"year": 1996
/_ Centennial Olympics _/
}
- [ ]
{
"host": "Atlanta",
"year": 1996,
/_ Centennial Olympics _/
}
- [ ]
{
"host": "Atlanta",
"year": 1996
// Centennial Olympics
}
- [x]
{
"host": "Atlanta",
"year": 1996,
"comments": "Centennial Olympics"
}
- yes
- only if there is more than one item
- no
- only when arrays and objects contain more than 10 items
- 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. <<<<----Correct
- Nothing is wrong with it.
printNullness(JSON.parse('{ "lemmings": [] }'));
printNullness(JSON.parse('{ "lemmings": null }'));
printNullness(JSON.parse('{ "lemmings": "null" }'));
function printNullness(){
if (testMe.lemmings == null)
console.log("null");
else
console.log("not null");
}
-
not null null not null
-
null null not null
-
not null null null
-
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.022\E23"
- constant: 6.022E23
- constant: "6.022E23"
note it should be mentioned that 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' ] }
-
{ "avengers": [ "iron man", "hulk", "thor", "black widow", "ant man", "spider man" ] }
-
{ 'avengers': [ {'iron man', 'hulk', 'thor', 'black widow', 'ant man', 'spider man'} ] }
-
{ 'avengers': [ 'iron man', 'hulk', 'thor', 'black widow', 'ant man', 'spider man' ] }
-
{ "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": "nul1"
- lastVisit: null
- "lastVisit": 0
- "lastVisit": undefined
NONE OF THESE ARE CORRECT A CORRECT ANSWER WOULD LOOK LIKE
"lastVisit": null
- 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'
NONE OF THESE ARE CORRECT A CORRECT ANSWER WOULD LOOK LIKE
"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.