linkedin-skill-assessments-quizzes

JSON

Q1. By convention, what name is used for the first key in a JSON schema?

Q2. Which code is the closest JSON equivalent of the data shown?

[
    'red',
    'blue',
    'green'
]
["red", "blue", "green"]
["red", "blue", "green"]
{
  "color": "red",
  "color": "blue",
  "color": "green"
}
{
  "red": "red",
  "blue": "blue"
}

Q3. Which JavaScript method converts a JavaScript value to Json?

Q4. Which data type is NOT part of JSON standard?

Q5. Which term is commonly used to refer to converting data to JSON?

Q6. Which code uses the correct JSON syntax to encode the key/value pair shown?

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?

Q8. Which date type is part of the JSON standard?

Q9. Which key name is used to specify properties that must be included for JSON to be valid?

Q10. Which is the valid JSON equivalent of the data shown?

{
	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]
  }
}
{
  "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"]
  }
}

Q11. How do you store several paragraphs of text as a string in JSON?

Q12. What data type is represented by the value of the key/value pair shown?

loggedIn: true

Q13. If you need to store the loggedIn status of a user in JSON as a boolean, what is the correct syntax?

Q14. What does JSON with padding (JSON-P) use to make a request?

Q15. Which value is supported in the JSON specifications?

Q16. Which JavaScript method converts a Json to JavaScript value?

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.

Q18. Which code uses valid JSON syntax for the text “Centennial Olympics?

{
"host": "Atlanta",
"year": 1996
/_ Centennial Olympics _/
}
{
"host": "Atlanta",
"year": 1996,
/_ Centennial Olympics _/
}
{
  "host": "Atlanta",
  "year": 1996
  // Centennial Olympics
}
{
  "host": "Atlanta",
  "year": 1996,
  "comments": "Centennial Olympics"
}

Q19. Can trailing commas be used in objects and arrays?

Q20. Which whitespace characters should be escaped within a string?

Q21. Which is supported by YAML but not supported by JSON?

Q22. Which is an invalid JSON value?

Q23. How do you encode a date in JSON?

Q24. What’s wrong with this JavaScript?

JSON.parse({"first": "Sarah", "last": "Connor"}) ;

Q25. What does this JavaScript code print?

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

Q26. What tool might you use to validate your JSON?

Q27. What characters denote strings in JSON?

Q28. Which code is a valid JSON equivalent of the key/value pair shown that also preserves the data type? constant: 6.022E23

Explanation: Scientific Notation is a valid JSON number. You can use e or E. (Reference)

Q29. Which element is added to the DOM to create a JSON-P request?

Q30. Why do so many APIs use JSON?

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.

Q33. How is a true boolean value represented in JSON?

Q34. Which array is valid JSON?

Q35. What data type is encoded in the outermost component of the JSON shown?

[
  {
    "year": 2024
  },
  {
    "location": "unknown"
  }
]

Q36. Which is ignored by JSON but treated as significant by YAML?

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?

Q38. How do you assign a number value in JSON?

Q39. Which code uses the correct JSON syntax for encoding a key/value pair with a null value?

Note: None of the above options appear to be correct. A correct answer would be "lastVisit": null

Q40. Which reference to the Unicode character U+1F602 complies with the JSON standard?

Q41. Which code uses the correct JSON syntax for a key/Value pair containing a string?

Q42. Which key name is used to specify data type in a JSON schema?

Q43. Which code is a valid JSON equivalent of the key/value pair shown that also preserves the original value?

Q44. Which data format is a JSON schema written in?

Q45. Which code is valid JSON equivalent of the key/value pair shown that also preserves the data type?

Q46. With what character should key/value pairs be separated?

Q47. What character separates keys from values?

Q48. If a string contains line breaks, what should you do?

Q49. Which number types are available in javascript but not supported in json?

Q50. How should a date value be stored in JSON?

Q51. Is the JSON code shown here valid?

JSON object with key "Vehicles" containing an array of emojis

Q52. What data structure do you use to encode ordered information?

Q53. What are valid values in JSON?

Q54. Which key format is valid JSON?

Q55. What data type is encoded in the outermost component of the JSON shown?

{
  "result": [
    {
      "year": 2024
    },
    {
      "location": "unknown"
    }
  ]
}

Q56. What’s wrong with this JSON object?

{
  "series": "Star Trek",
  "episodes": "The Trouble with Tribbles"
}

Q57. How should comments be formatted in JSON?

Q58. How would you make the following string valid in JSON?

"name": 'bb-8'

Q59. How are values separated in JSON?

Q60. With which programming language is JSON best used?

Q61. What values can arrays contain?

Q62. What technique can be used to represent complex objects with JSON?

Q63. What characters are used to enclose an array?

Q64. What is the official MIME type for JSON?

Q65. What character cannot be part of string within JSON without additional formatting?