JSON-based Format

From GM-RKB
Jump to navigation Jump to search

A JSON-based Format is a data format that employs JSON (JavaScript Object Notation) for data structuring and exchanging data.

  • Context:
    • It can be used for transmitting structured data over a network connection, often used in Web APIs and config files.
    • It can be text-based and human-readable, making it easy to write and debug by developers.
    • It can be lighter compared to XML, and is often used in AJAX (Asynchronous JavaScript and XML) communication.
    • It can support complex nested data structures including arrays and objects.
    • It can be easily parsed and generated by most programming languages.
    • It can be a popular choice for data interchange in web development, mobile application development, and NoSQL databases.
    • It can be extended to create more specialized formats such as JSON-LD (JSON for Linked Data) which is used to serialize Linked Data.
    • It can support UTF-8 encoding for multilingual content.
  • Example(s):
    • JSON-LD (JSON for Linked Data): A method of encoding Linked Data using JSON, primarily used in web-based applications and services.
    • GeoJSON: Used for encoding a variety of geographic data structures, representing simple geographical features and their non-spatial attributes.
    • BSON (Binary JSON): A binary representation of JSON-like documents, designed for efficiency and used primarily in MongoDB.
    • JSON-RPC: A remote procedure call (RPC) protocol encoded in JSON, used for executing remote procedures and returning results.
    • JSON Web Token (JWT): A compact, URL-safe format for representing claims to be transferred between two parties, widely used for token-based authentication.
    • JSONP (JSON with Padding): A technique to overcome the cross-domain policy by loading a script from a different domain, with JSON data embedded in a padding function.
    • NDJSON (Newline Delimited JSON): Stores or streams structured data that may be processed one record at a time, with each line being a valid JSON object.
    • HAL (Hypertext Application Language): A standard for defining hypermedia within JSON or XML code.
    • JSend: A specification for how a server should respond to client requests in a consistent format within JSON.
    • JSON Schema: A vocabulary for annotating and validating JSON documents, defining the structure and data types of JSON files.
  • Counter-Example(s):
    • Using XML to exchange data in a SOAP-based web service.
    • A CSV file that stores tabular data.
  • See: JSON, Web APIs, AJAX, NoSQL databases, JSON-LD, UTF-8, RESTful web service, Web Development, Data Serialization.


References

Year

  • (JSON) ⇒ "Introducing JSON", JSON.org
    • QUOTE: JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.