Home/Glossary/JSON (JavaScript Object Notation)

JSON (JavaScript Object Notation)

A lightweight data interchange format using human-readable text to represent structured data.

DevelopmentAlso called: "json data", "json structure"

JSON is the de facto standard for APIs and configuration files due to its simplicity.

Data types

  • Objects: Key-value pairs wrapped in {}.
  • Arrays: Ordered lists wrapped in [].
  • Strings, Numbers, Booleans, Null: Primitive values.

Best practices

  • Validate JSON schema to prevent malformed data.
  • Escape special characters in strings to avoid injection.
  • Minimize whitespace in production for smaller payloads.
  • Use consistent formatting for readability in source control.

Security considerations

  • Avoid eval() or unsafe deserialization.
  • Validate input before processing.
  • Set size limits to prevent denial of service.