Tuesday, December 05, 2023

Which JSON data type is an unordered set of attribute-value pairs?

JSON is often used to represent two primary data structures:

  • Object: An unordered set of key-value pairs, where each key is a string and each value can be a string, number, boolean, null, object, or array.
  • Array: An ordered list of values, where each value can be a string, number, boolean, null, object, or another array.

The JSON data type that represents an unordered set of attribute-value pairs is an "object." In JSON (JavaScript Object Notation), an object is a collection of key-value pairs where each key is a string and each value can be a string, number, boolean, null, array, or another object. The order of the key-value pairs within the object is not guaranteed or significant.

No comments: