FLOW JSON/1 value model
FLOW uses JSON as a bounded cross-language value format. JSON/1 fixes the parts which ordinary host parsers otherwise disagree about; it is not a new serialization syntax.
It applies to protocol frames, settings, inputs, results, schemas, and descriptors unless a particular protocol or value seam states a lower limit.
Syntax and strings
JSON/1 is RFC 8259 JSON encoded as UTF-8, with no BOM. Parsers reject duplicate object member names before constructing an object. Strings and member names contain Unicode scalar values only; literal or escaped lone surrogates are invalid. Host-language object prototypes and magic property names have no semantic role.
Numbers
A number is a finite IEEE 754 binary64 value obtained by correctly rounded
decimal conversion using round-to-nearest, ties-to-even. NaN and infinities are
not values. A number whose resulting value is mathematically integral must be
within [-9007199254740991, 9007199254740991]; larger integral quantities use
strings. Negative zero is admitted but equals and canonicalizes as zero.
Consequently 1 and 1.0 are the same JSON/1 value, while the integer token
9007199254740993 is invalid instead of being preserved by Python and rounded
by JavaScript.
Equality and canonical bytes
Equality is recursive:
- null, booleans, and strings compare by exact value;
- numbers compare by their binary64 numeric value, with
-0equal to0; - arrays compare by length and corresponding values in order;
- objects compare by the same exact member-name set and equal corresponding values, independent of source member order.
RFC 8785 serializes an already valid JSON/1 value for digests and operation identities. Canonicalization does not repair duplicate keys, invalid Unicode, an out-of-domain number, or an oversized value; those fail first.
Absolute value limits
One encoded JSON/1 document or protocol frame has these inclusive maxima:
Every array item and object member value is one child value node; member names are not additional nodes. A narrower protocol, contract, or schema may impose a smaller bound only when that bound is fixed and known before the value is produced or accepted. It may never accept a value above the JSON/1 absolute maxima while claiming JSON/1 conformance.
JSON/1 does not define a universal wire error name. The protocol or value seam
reports the applicable failure—for example a fatal framing error, JSON-RPC
invalid params, INVALID_INPUT, INVALID_RESULT, or
SCHEMA_INVALID_JSON.