Definition of whitespace in Json Definition of whitespace in Json json json

Definition of whitespace in Json


Insignificant whitespace is defined in the RFC4627 for JSON:

Insignificant whitespace is allowed before or after any of the six
structural characters.

  ws = *(            %x20 /              ; Space            %x09 /              ; Horizontal tab            %x0A /              ; Line feed or New line            %x0D                ; Carriage return        )

By the way, the default encoding is UTF-8:

JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.

That being said, I don't think they intended to accept all forms of Unicode spaces in the original implementation.