linkedin-skill-assessments-quizzes

JSON

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

Reference

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

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

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

Reference

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

Reference

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'

Reference

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?

Reference

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

Reference

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": true,
    "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"]
  }
}

Reference

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

Reference

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

Reference

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

Q15. Which value is supported in the JSON specifications?

Reference

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

Reference

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,
  "comment": "Centennial Olympics"
}
{
  "host": "Atlanta",
  "year": 1996,
  \"Centennial Olympics\"
}
{
  "host": "Atlanta",
  "year": 1996,
  "comment": "\"Centennial Olympics"
}

Reference

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

Reference

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

Reference

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

Reference

Q22. Which is an invalid JSON value?

Q23. How do you encode a date in JSON?

Reference

Q24. What’s wrong with this JavaScript?

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

Reference

Q25. What does this JavaScript code print?

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');
}
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?

Reference

Q27. What characters denote strings in JSON?

Reference

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

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

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

Q30. Why do so many APIs use JSON?

Reference

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?

Reference

Q34. Which array is valid JSON?

Reference

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

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

Reference

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

Reference

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?

Reference

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?

Reference

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?

Reference

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

Reference

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

Reference

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?

Reference

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

Reference

Q47. What character separates keys from values?

Reference

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?

Reference

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?

Reference

Q53. What are valid values in JSON?

Q54. Which key format is valid JSON?

Reference

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",
  "season": 3
}

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. Which character cannot be part of string within JSON without additional formatting?

Q66. What is the purpose of JSON?

Q67. Can you assume the order of keys in an object?

Q68. With what character should object keys be enclosed?

Q69. What is the maximum number of key/value pairs that JSON supports?

Q71. Does JSON support signed numbers?

Q72. What two nonnumerical characters can numbers contain?

Q73. What JavaScript method is used to load JSON data?

Q74. How are the values in an array separated?

Q75. What is the minimum number of values in an array?

Q76. In JSON, a set of brackets ([]) is used to denote _, whereas curly braces ({}) denote _.

Q77. How does JSON represent truth, falsity and nullness?

Q78. If an object key contains spaces, how can you access its value in JavaScript?

Q79. When parsing JSON, “caching” is a method used to _.

Q80. What is the only valid whitespace character within a string that does not require an escape character?

Q81. What technique can you use to safely encode very large numbers?

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

variance: -0.0823

Reference

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',
    },
  },
};
myVehicleContents.van.inside['glove box'] = gloveBoxContents;
var gloveBoxContents = myVehicleContents.van.inside['glove box'];
gloveBoxContents;
var gloveBoxContents = myVehicleContents.van.glove box.contents;
gloveBoxContents;
myVehicleContents.van.inside['inside'] = gloveBoxContents;

Source

Q84. What characters are used to define an object?

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?

Q86. What is supported by YAML but not supported by JSON?

YAML supports # comments but not JSON

Q87. Which is an invalid JSON value? (same as previous question, but different possible answers)

Q88. How can you change this array to make it valid?

{"rey",'leia',"ashoka",}

Q89. If a non-zero number starts with a zero, what character should immediately follow the zero?

Q90. Who would you modify the array below to store additional attributes for each student?

{
  "students": ["Tess", "Erin", "June"]
}

Q91. Which is not a valid JSON number

Q92. What is the maximum string length in JSON?

Q94. How would you update this JSON to indicate that Jane is now available for part-time work ?

{
  "name": "Jane",
  "job": "developer",
  "skills": ["ruby", "rails", "javascript"],
  "available": false
}
{
  "name": "Jane",
  "job": "developer",
  "skills": ["ruby", "rails", "javascript"],
  "available": true,
  "seeking": "part-time"
}
{
  "name": "Jane",
  "job": "developer",
  "skills": ["ruby", "rails", "javascript"],
  "available": "true",
  "seeking": "part-time"
}
{
  "name": "Jane",
  "job": "developer",
  "skills": ["ruby", "rails", "javascript"],
  "available": false,
  "seeking": "part-time"
}
{
  "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.

Q95. When you need to set the value of a key in JSON to be blank, what is the correct syntax for the empty value?

Explanation: The other options won’t work as well, as demonstrated by this StackOverflow post.

Q96. What is true about paginated reports? (Select all that apply.)

A. They are formatted to fit well on a page.

B. They shrink the report data to fit on a page.

C. They truncate the report data to fit on a single page.

D. They are both printable and shareable.

Explanation: The true statements about paginated reports are: A. They are formatted to fit well on a page. D. They are both printable and shareable. So the correct options are A and D.

Q97. As a Scrum Master you have noticed a pattern that the most interesting stories on the sprint backlog get started right away, and the least interesting stories languish or don’t get done. What should you do?

Explanation: Encourage open communication within the team and involve them in problem-solving to find a solution that works best for their specific context and helps address the issue of disinterest in certain stories.

Q99. When you need to set the value of a key in JSON to be blank, what is the correct syntax for the empty value?

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

Q102. What’s wrong with this JavaScript?

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

Q103. 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" ]}

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

Q105. How should comments be formatted in JSON?

Q106. What is the purpose of JSON-P (JSON with padding) in web development, and how is it typically used?

Explanation:- JSON-P, or JSON with padding, serves the purpose of overcoming the same-origin policy limitation in web development. The same-origin policy restricts web pages from making AJAX requests to a different domain for security reasons. JSON-P works by wrapping JSON data in a JavaScript function call, allowing data to be retrieved from an external domain as if it were a script. This technique is commonly used for securely fetching data from external APIs, making it a valuable tool for cross-domain data exchange in web applications.

Q107. In a JSON document, how can you represent a key that contains special characters, such as spaces or hyphens, to ensure proper parsing and access in JavaScript?

Explanation:- When you have a key in a JSON document that contains special characters, spaces, or hyphens, it is essential to enclose the key in double quotes. JSON requires keys to be represented within double quotes to ensure proper parsing and access in JavaScript. This ensures that JavaScript can correctly interpret keys with special characters or spaces and access their associated values.

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

Q109. 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,
  "comment": "Centennial Olympics"
}
{
  "host": "Atlanta",
  "year": 1996,
  \"Centennial Olympics\"
}
{
  "host": "Atlanta",
  "year": 1996,
  "comment": "\"Centennial Olympics"
}

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

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

Q111. Which is an invalid JSON value?

Q112. What are the valid number types in JSON?

Q114. What is the purpose of JSON Web Tokens (JWT)?

Q115. What is JSON-RPC used for?

Q116. Which of the following is a key difference between JSON and XML?

Q117. Which HTTP header is commonly used to prevent cross-site scripting (XSS) attacks when working with JSON?

Q118. What does the JSON Merge Patch format allow you to do?

Q119. Which method is used to parse a JSON string and return a JavaScript object in modern web browsers?

Q120. What is the primary purpose of JSON-LD (JSON Linked Data)?

Q121. What is the correct way to represent an empty array in JSON?

Explanation: An empty array in JSON is represented by square brackets with nothing inside: []. Curly braces {} represent an empty object, not an array.

Reference

Q122. What is the correct way to represent an empty object in JSON?

Explanation: An empty object in JSON is represented by curly braces with nothing inside: {}. Square brackets [] represent an empty array, not an object.

Reference

Q123. Can JSON keys contain spaces?

Explanation: JSON keys can contain spaces, but like all JSON keys, they must be enclosed in double quotes. For example: {"first name": "John"} is valid JSON.

Reference

Explanation: JSON specification doesn’t define a maximum nesting depth, but practical limits exist based on parser implementations. Most parsers handle reasonable nesting (typically 100+ levels), but deeply nested structures can cause performance issues.

Reference

Q125. Which of these is NOT a valid JSON number?

Explanation: Hexadecimal notation like 0xFF is not valid in JSON. JSON only supports decimal numbers, including negative numbers, decimals, and scientific notation.

Reference

Q126. Can JSON represent dates natively?

Explanation: JSON has no native date type. Dates are typically represented as strings (often in ISO 8601 format like “2024-01-01T00:00:00Z”) or as numbers (Unix timestamps).

Reference

Q127. What is JSON Schema used for?

Explanation: JSON Schema is a vocabulary that allows you to annotate and validate JSON documents, defining the expected structure, data types, and constraints.

Reference

Q128. Which JSON Schema keyword is used to specify that a property is required?

Explanation: The required keyword in JSON Schema specifies an array of property names that must be present in the JSON object.

Reference

Q129. What does the $schema keyword indicate in JSON Schema?

Explanation: The $schema keyword identifies which version of the JSON Schema specification the schema is written against.

Reference

Q130. Can JSON comments be included using // or /* */?

Explanation: Standard JSON does not support comments. However, JSON5 (an extension) does support comments. For standard JSON, you can use a special key like “_comment” if you need annotations.

Reference

Q131. What is JSON5?

Explanation: JSON5 is an extension to JSON that aims to make it easier for humans to write and maintain by adding features like comments, trailing commas, unquoted keys, and more.

Reference

Q132. What is JSONP used for?

Explanation: JSONP (JSON with Padding) was a technique to request data from a server in a different domain, bypassing same-origin policy. It’s now largely replaced by CORS.

Reference

Q133. What is the correct MIME type for JSON?

Explanation: The official MIME type for JSON is application/json. While text/json was sometimes used historically, application/json is the standard.

Reference

Q134. Can JSON keys be numbers?

Explanation: In JSON, all keys must be strings enclosed in double quotes. Even if a key looks like a number, it must be quoted: {"123": "value"}.

Reference

Q135. What is the difference between JSON.parse() and eval() for parsing JSON?

Explanation: JSON.parse() is the safe way to parse JSON as it only parses JSON syntax. eval() executes any JavaScript code, making it a security risk if used with untrusted data.

Reference

Q136. What does JSON.stringify() do with undefined values in objects?

Explanation: When JSON.stringify() encounters undefined as a property value in an object, it omits that property from the output. However, undefined in arrays becomes null.

Reference

Q137. What is the second parameter of JSON.stringify() used for?

Explanation: The second parameter (replacer) can be a function that transforms values or an array that specifies which properties to include in the output.

Reference

Q138. What is the third parameter of JSON.stringify() used for?

Explanation: The third parameter specifies the indentation for pretty-printing. It can be a number (spaces) or a string (like “\t” for tabs).

Reference

Q139. Can JSON represent circular references?

Explanation: JSON cannot represent circular references. Attempting to stringify an object with circular references will throw a “TypeError: Converting circular structure to JSON” error.

Reference

Q140. What is JSON Pointer (RFC 6901)?

Explanation: JSON Pointer defines a string syntax for identifying a specific value within a JSON document, like “/users/0/name” to access the name of the first user.

Reference

Q141. What is JSON Patch (RFC 6902)?

Explanation: JSON Patch defines a format for expressing a sequence of operations (add, remove, replace, move, copy, test) to modify a JSON document.

Reference

Q142. What is the toJSON() method used for?

Explanation: If an object has a toJSON() method, JSON.stringify() will call it and use its return value instead of the original object.

Reference

Q143. Can JSON represent binary data?

Explanation: JSON has no native binary type. Binary data must be encoded as strings, typically using Base64 encoding.

Reference

Q144. What is the maximum string length in JSON?

Explanation: The JSON specification doesn’t define a maximum string length. Practical limits depend on the parser implementation and available memory.

Reference

Q145. What is JSON-RPC?

Explanation: JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol that uses JSON to encode calls and responses.

Reference

Q146. What is GeoJSON?

Explanation: GeoJSON is a format for encoding a variety of geographic data structures using JSON, commonly used in mapping applications.

Reference

Q147. What is the purpose of the reviver parameter in JSON.parse()?

Explanation: The reviver parameter is a function that can transform the parsed values before they are returned, useful for converting strings to dates or other custom transformations.

Reference

Q148. Can JSON property names be duplicate?

Explanation: While JSON parsers typically accept duplicate keys, the behavior is undefined in the specification. Most implementations use the last value, but this should be avoided.

Reference

Q149. What is BSON?

Explanation: BSON (Binary JSON) is a binary-encoded serialization format used by MongoDB. It extends JSON with additional data types like Date and Binary.

Reference

Q150. What is MessagePack?

Explanation: MessagePack is an efficient binary serialization format that is more compact than JSON and supports additional types.

Reference

Q151. What is the correct way to represent a boolean true in JSON?

Explanation: JSON boolean values are lowercase: true and false. They are not strings and not capitalized.

Reference

Q152. What is the correct way to represent null in JSON?

Explanation: The null value in JSON is lowercase: null. It is not a string and not capitalized. undefined is not a valid JSON value.

Reference

Q153. Can JSON represent functions?

Explanation: JSON cannot represent functions. If you try to stringify an object with function properties, those properties will be omitted.

Reference

Q154. What is JSON Web Token (JWT)?

Explanation: JWT is a standard for creating access tokens that assert claims. It consists of three parts: header, payload (JSON), and signature.

Reference

Q155. What are the three parts of a JWT?

Explanation: A JWT consists of three Base64-encoded parts separated by dots: Header (algorithm and type), Payload (claims), and Signature (verification).

Reference

Q156. What is JSON Schema’s type keyword used for?

Explanation: The type keyword in JSON Schema specifies the data type: “string”, “number”, “integer”, “boolean”, “array”, “object”, or “null”.

Reference

Q157. What is the enum keyword in JSON Schema?

Explanation: The enum keyword restricts a value to one of a fixed set of values, like {"enum": ["red", "green", "blue"]}.

Reference

Q158. What is the pattern keyword in JSON Schema?

Explanation: The pattern keyword specifies a regular expression that a string value must match to be valid.

Reference

Q159. What is the minimum keyword in JSON Schema?

Explanation: The minimum keyword specifies the minimum value (inclusive) that a numeric value can have.

Reference

Q160. What is the maxLength keyword in JSON Schema?

Explanation: The maxLength keyword specifies the maximum length (number of characters) that a string value can have.

Reference

Q161. What is JSON-LD used for?

Explanation: JSON-LD (JSON for Linking Data) is a method of encoding linked data using JSON, adding semantic meaning and context to data.

Reference

Q162. What is the @context keyword in JSON-LD?

Explanation: The @context keyword in JSON-LD defines the context for interpreting the JSON document, mapping terms to IRIs (Internationalized Resource Identifiers).

Reference

Q163. Can JSON represent infinity?

Explanation: JSON numbers cannot represent infinity or NaN. Attempting to stringify these values results in null.

Reference

Q164. What is the correct way to escape a double quote in a JSON string?

Explanation: Double quotes inside JSON strings must be escaped with a backslash: \". For example: "He said \"Hello\"".

Reference

Q165. What is the correct way to represent a newline in a JSON string?

Explanation: Newlines in JSON strings are represented by the escape sequence \n. Literal newlines are not allowed in JSON strings.

Reference

Q166. What is the correct way to represent a tab in a JSON string?

Explanation: Tabs in JSON strings are represented by the escape sequence \t. Literal tabs are not allowed in JSON strings.

Reference

Q167. What is the correct way to represent a backslash in a JSON string?

Explanation: Backslashes in JSON strings must be escaped with another backslash: \\. For example: "C:\\Users\\Name".

Reference

Q168. Can JSON represent Unicode characters?

Explanation: JSON supports Unicode characters either directly (if the file is UTF-8 encoded) or using \uXXXX escape sequences where XXXX is the hexadecimal code point.

Reference

Q169. What is the additionalProperties keyword in JSON Schema?

Explanation: The additionalProperties keyword determines whether properties not explicitly defined in the schema are allowed in the JSON object.

Reference

Q170. What is the items keyword in JSON Schema?

Explanation: The items keyword in JSON Schema defines the schema that array elements must conform to.

Reference

Q171. What is the $ref keyword in JSON Schema?

Explanation: The $ref keyword allows you to reference another schema or a definition within the same schema, enabling schema reuse.

Reference

Q172. What is the definitions keyword in JSON Schema?

Explanation: The definitions (or $defs in newer versions) keyword allows you to define reusable schema components that can be referenced with $ref.

Reference

Q173. What is the allOf keyword in JSON Schema?

Explanation: The allOf keyword requires that the data validates against all of the schemas in the array, useful for combining schemas.

Reference

Q174. What is the anyOf keyword in JSON Schema?

Explanation: The anyOf keyword requires that the data validates against at least one of the schemas in the array.

Reference

Q175. What is the oneOf keyword in JSON Schema?

Explanation: The oneOf keyword requires that the data validates against exactly one (and only one) of the schemas in the array.

Reference

Q176. What is the not keyword in JSON Schema?

Explanation: The not keyword requires that the data does not validate against the given schema, useful for excluding certain patterns.

Reference

Q177. What is Content Security Policy (CSP) and how does it relate to JSON?

Explanation: Content Security Policy is an HTTP header that helps prevent XSS attacks. It can restrict which sources can load JSON and other resources.

Reference

Q178. What is the purpose of the format keyword in JSON Schema?

Explanation: The format keyword provides semantic validation for string values, like “email”, “uri”, “date-time”, “ipv4”, etc.

Reference

Q179. What is JSON Hyper-Schema?

Explanation: JSON Hyper-Schema extends JSON Schema to describe hypermedia APIs, including links and link relations.

Reference

Q180. What is the best practice for handling large JSON files?

Explanation: For large JSON files, streaming parsers (like SAX-style parsers) are recommended as they process the file incrementally without loading everything into memory.

Reference

Q181. In JSON, how do you represent a tab character in a string?

Q182. What is JSON API (jsonapi.org)?

Q183. Which of the following is true about JSON and GraphQL?

Q184. What is the purpose of the “dependencies” keyword in JSON Schema?

Q185. In JSON, what is the correct way to represent a carriage return in a string?

Q186. What is the purpose of JSON Schema’s “const” keyword?

Q187. Which of the following is a valid JSON boolean value?

Q188. What is the purpose of the “multipleOf” keyword in JSON Schema?

Q189. In JSON, how do you represent a form feed character in a string?

Q190. What is JSON Merge Patch (RFC 7396)?

Q191. Which of the following is true about JSON and REST APIs?

Q192. What is the purpose of the “if”, “then”, “else” keywords in JSON Schema?

Q193. In JSON, what is the maximum number of properties an object can have?

Q194. What is the purpose of JSON Schema’s “propertyNames” keyword?

Q195. Which of the following is true about JSON and NoSQL databases?

Q196. What is the purpose of the “contentMediaType” keyword in JSON Schema?

Q197. In JSON, how do you represent a backspace character in a string?

Q198. What is JSON-LD Context?

Q199. Which of the following is true about JSON and microservices?

Q200. What is the purpose of the “contentEncoding” keyword in JSON Schema?

Q201. In JSON, what is the correct way to represent an empty string?

Q202. What is JSON Feed?

Q203. Which of the following is true about JSON and WebSockets?

Q204. What is the purpose of the “readOnly” keyword in JSON Schema?

Q205. In JSON, which of the following is a valid way to represent NaN (Not a Number)?

Q206. What is JSON Resume?

Q207. Which of the following is true about JSON and CORS?

Q208. What is the purpose of the “writeOnly” keyword in JSON Schema?

Q209. In JSON, what is the maximum depth of nested arrays?

Q210. What is JSON-stat?

Q211. Which of the following is true about JSON and caching?

Q212. What is the purpose of the “examples” keyword in JSON Schema?

Q213. In JSON, how do you represent a Unicode character?

Q214. What is JSON Table Schema?

Q215. Which of the following is true about JSON and ETags?

Q216. What is the purpose of the “deprecated” keyword in JSON Schema?

Q217. In JSON, what is the correct way to represent a literal backslash?

Q218. What is JSON-LD Frame?

Q219. Which of the following is true about JSON and pagination?

Q220. What is the purpose of the “title” and “description” keywords in JSON Schema?

Q222. Which of the following is a valid JSON representation of a date?

Q223. What does the term “JSON serialization” refer to?

Q224. In JSON, what is the difference between null and undefined?

Q225. What is JSON Pointer (RFC 6901) used for?

Q226. Which HTTP status code typically indicates successful JSON API response?

Q227. What is the purpose of JSON Web Encryption (JWE)?

Q228. In a RESTful API, which HTTP method is typically used to send JSON data for creating a new resource?

Q230. Which tool can be used to validate JSON schema compliance?

Q231. What is the purpose of the $schema keyword in JSON Schema?

Q232. In JSON, how do you represent an empty object?

Q233. What is BSON?

Q234. Which of the following is true about JSON and JSONP?

Q235. What is the maximum string length in JSON?

Q236. Which character encoding is required for JSON?

Q237. What is the purpose of JSON Patch (RFC 6902)?

Q238. In JSON Schema, what does the “required” keyword specify?

Q239. What is the difference between JSON.stringify() and JSON.parse()?

Q240. Which of the following is a valid way to include comments in JSON?

Q241. What is JSON5?

Q242. In JSON, what is the correct way to represent a boolean false value?

Q243. What is the purpose of the “additionalProperties” keyword in JSON Schema?

Q244. Which of the following is true about JSON and JavaScript objects?

Q245. What is the purpose of JSON Web Signature (JWS)?

Q246. In a JSON API, what does the HTTP status code 400 typically indicate?

Q248. Which of the following is a valid JSON array?

Q249. What is the purpose of the “enum” keyword in JSON Schema?

Q250. In JSON, how do you represent a null value?

Q251. What is JSON-RPC?

Q252. Which of the following is true about JSON key names?

Q253. What is the purpose of the “$ref” keyword in JSON Schema?

Q254. In JSON, what is the correct way to escape a double quote character?

Q255. What is the maximum size of a JSON document?

Q256. Which of the following is a valid use case for JSON?

Q257. What is the purpose of JSON Schema’s “format” keyword?

Q258. In JSON, which of the following represents an empty array?

Q259. What is the difference between JSON and XML?

Q260. What is the purpose of the “oneOf” keyword in JSON Schema?

Q261. In JSON, how do you represent scientific notation?

Q262. What is JSON Lines (JSONL)?

Q263. Which HTTP header should be set when sending JSON data in a request?

Q264. What is the purpose of JSON Schema’s “allOf” keyword?

Q265. In JSON, what is the correct way to represent a negative number?

Q266. What is the purpose of the “default” keyword in JSON Schema?

Q267. Which of the following is true about JSON and YAML?

Q268. What is the purpose of JSON Schema’s “anyOf” keyword?

Q269. In JSON, how do you represent a decimal number?

Q270. What is the purpose of JSON Schema’s “not” keyword?

Q271. Which of the following is a valid JSON number?

Q272. What is the purpose of the “minLength” and “maxLength” keywords in JSON Schema?

Q273. In JSON, what is the correct way to represent an object with no properties?

Q274. What is JSON Hyper-Schema?

Q275. Which of the following is true about JSON property order?

Q276. What is the purpose of the “minimum” and “maximum” keywords in JSON Schema?

Q277. In JSON, which of the following is a valid way to represent infinity?

Q278. What is the purpose of JSON Schema’s “pattern” keyword?

Q279. Which of the following is true about JSON and MongoDB?

Q280. What is the purpose of the “uniqueItems” keyword in JSON Schema?

Q281. What is the purpose of JSON-P (JSON with padding) in web development, and how is it typically used?

Q282. In a JSON document, how can you represent a key that contains special characters, such as spaces or hyphens, to ensure proper parsing and access in JavaScript?