JASon Design overview

Registered by A.Ou

This minimalistic library was originally written to serve in a database modeling program, as a way to convert diagrams to and from human-readable text files. Given that the number of entities/attributes/relationships expressed by a complex diagram can lead easily to a large file, performance with parsing long text streams is a primary concern; therefore, JSONReader and JSONWriter are implemented with a simple event-based API comparable to SAX.
While a number of Java libraries exist for JSON, most are intended for serialization/deserialization of Java-specific objects and/or use a DOM-based approach (undesirable for the aforementioned database modeler, since a full DOM tree can unnecessary duplicate data structures).

JSONReader parses JSON text in a single pass, while never holding the entire document in memory. The client can be notified of JSON elements through callback methods defined in an intermediate handler. To complement the parser, JSONWriter provides generator methods for writing JSON members individually. Both the reader and writer follow RFC 4627 guidelines and validate the streams for compliance.
In certain cases where DOM organization is desired, there is DOM utility class that adapts JSONReader for producing a DOM tree.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Informational Informational
Milestone target:
None
Started by
A.Ou
Completed by
A.Ou

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.