JSONWriter
A stateful JSON writer that produces ASCII-only documents that adhere strictly to ECMA 404: "The JSON Data Interchange Format".
Author
Todd L Smith
Richard Arriaga
See also
Parameters
The target for the raw JSON document.
true indicates the JSON should be pretty-printed; false indicates the JSON should be minified.
Constructors
Construct a new JSONWriter.
Types
Functions
Answer the accumulated String contents of the JSONWriter.
Write an array beginning to the underlying document writer.
Write an object beginning to the underlying document writer.
Write the specified BigDecimal to the underlying document writer as a JSON number.
Write the specified BigInteger to the underlying document writer as a JSON number.
Write the specified Boolean to the underlying document writer as a JSON boolean.
Write the specified Double to the underlying document writer as a JSON number. Use JSON 5 extensions (and an additional NaN extension).
Write the specified Float to the underlying document writer as a JSON number.
Write the specified Long to the underlying document writer as a JSON number.
Write the specified String to the underlying document writer as a JSON string. All non-ASCII characters are encoded as Unicode escape sequences, so only ASCII characters will be written.
Write the specified JSON-friendly value to the underlying document writer.
Write the contents of the specified JSONWriter to the underlying document as a JSON value. This is only permitted whenever an arbitrary JSON value would be permitted.
Write an array, using an action to supply the contents.
Write an array of JSON-friendly values.
Write an array of boolean values.
Write an array of double values.
Write an array of float values.
Write an array of long values.
Write a map keyed by an arbitrary type to another arbitrary type as a JSONObject with the map keys transformed into JSONObject keys using the key creator lambda and the corresponding map values transformed into JSONFriendly using the value creator lambda as the JSONObject field values.
Write a map keyed by an arbitrary type to JSONFriendly as a JSONObject with the map keys transformed into JSONObject keys using the key creator lambda and the corresponding map values as the JSONObject field values.
Write a map keyed by an arbitrary type to another arbitrary type as a JSONArray of JSONArray pairs with the map keys as the first element in the JSONArray pair and the value as the second element in the JSONArray pair transformed into JSONFriendly - JSONFriendly pairs by the provided lambda.
Write a String to Boolean as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Iterable of Boolean as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Double as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Iterable of Double as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Float as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Iterable of Float as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Int as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Iterable of Int as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Iterable of JSONFriendly as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to JSONFriendly as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Long as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Iterable of Long as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to String as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write a String to Iterable of String as a JSONObject with the map keys as the JSONObject keys and the corresponding map values as the JSONObject field values.
Write an object, using an action to supply the contents.
Write an Iterator of Pairs keyed by an arbitrary type to another arbitrary type as a JSONArray of JSONArray pairs with the map keys as the first element in the JSONArray pair and the value as the second element in the JSONArray pair transformed into JSONFriendly - JSONFriendly pairs by the provided lambda.
Write an array of string values.