Is it valid to define functions in JSON results?


JSON is purely meant to be a data description language. As noted on, it is a “lightweight data-interchange format.” – not a programming language.

Per, the “basic types” supported are:

  • Number (integer, real, or floating
  • String (double-quoted Unicode
    with backslash escaping)
  • Boolean
    (true and false)
  • Array (an ordered
    sequence of values, comma-separated
    and enclosed in square brackets)
  • Object (collection of key:value
    pairs, comma-separated and enclosed
    in curly braces)
  • null

Leave a Comment