Package org.bson.json
Interface StrictJsonWriter
- All Known Implementing Classes:
StrictCharacterStreamJsonWriter
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
An interface for creating JSON texts that largely conform to RFC 7159.
- Since:
- 3.5
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Return true if the output has been truncated due to exceeding any maximum length specified in settings.voidwriteBoolean(boolean value) Deprecated.Writes a boolean to the writer.voidwriteBoolean(String name, boolean value) Deprecated.Writes a a member with a boolean value to the writer.voidDeprecated.Writes the end of a JSON array to the writer.voidDeprecated.Writes the end of a JSON object to the writer.voidDeprecated.Writes the name of a member to the writer.voidDeprecated.Writes a null value to the writer.voidDeprecated.Writes a member with a null value to the writer.voidwriteNumber(String value) Deprecated.Writes a number to the writer.voidwriteNumber(String name, String value) Deprecated.Writes a member with a numeric value to the writer.voidDeprecated.Writes a raw value without quoting or escaping.voidDeprecated.Writes a member with a raw value without quoting or escaping.voidDeprecated.Writes the start of a array to the writer.voidwriteStartArray(String name) Deprecated.Writes the start of JSON array member to the writer.voidDeprecated.Writes the start of a JSON object to the writer.voidwriteStartObject(String name) Deprecated.Writes the start of a JSON object member to the writer.voidwriteString(String value) Deprecated.Writes a String to the writer.voidwriteString(String name, String value) Deprecated.Writes a member with a string value to the writer.
-
Method Details
-
writeName
Deprecated.Writes the name of a member to the writer.- Parameters:
name- the member name- Throws:
BsonInvalidOperationException- if not in the correct state to write a member nameBSONException- if the underlying Writer throws an IOException
-
writeBoolean
void writeBoolean(boolean value) Deprecated.Writes a boolean to the writer.- Parameters:
value- the boolean value.- Throws:
BsonInvalidOperationException- if not in the correct state to write a valueBSONException- if the underlying Writer throws an IOException
-
writeBoolean
Deprecated.Writes a a member with a boolean value to the writer.- Parameters:
name- the member namevalue- the boolean value- Throws:
BsonInvalidOperationException- if not in the correct state to write a memberBSONException- if the underlying Writer throws an IOException
-
writeNumber
Deprecated.Writes a number to the writer.- Parameters:
value- the Double value, as a String so that clients can take full control over formatting- Throws:
BsonInvalidOperationException- if not in the correct state to write a valueBSONException- if the underlying Writer throws an IOException
-
writeNumber
Deprecated.Writes a member with a numeric value to the writer.- Parameters:
name- the member namevalue- the Double value, as a String so that clients can take full control over formatting- Throws:
BsonInvalidOperationException- if not in the correct state to write a memberBSONException- if the underlying Writer throws an IOException
-
writeString
Deprecated.Writes a String to the writer.- Parameters:
value- the String value- Throws:
BsonInvalidOperationException- if not in the correct state to write a valueBSONException- if the underlying Writer throws an IOException
-
writeString
Deprecated.Writes a member with a string value to the writer.- Parameters:
name- the member namevalue- the String value- Throws:
BsonInvalidOperationException- if not in the correct state to write a memberBSONException- if the underlying Writer throws an IOException
-
writeRaw
Deprecated.Writes a raw value without quoting or escaping.- Parameters:
value- the String value- Throws:
BsonInvalidOperationException- if not in the correct state to write a valueBSONException- if the underlying Writer throws an IOException
-
writeRaw
Deprecated.Writes a member with a raw value without quoting or escaping.- Parameters:
name- the member namevalue- the raw value- Throws:
BsonInvalidOperationException- if not in the correct state to write a memberBSONException- if the underlying Writer throws an IOException
-
writeNull
void writeNull()Deprecated.Writes a null value to the writer.- Throws:
BsonInvalidOperationException- if not in the correct state to write a valueBSONException- if the underlying Writer throws an IOException
-
writeNull
Deprecated.Writes a member with a null value to the writer.- Parameters:
name- the member name- Throws:
BsonInvalidOperationException- if not in the correct state to write a memberBSONException- if the underlying Writer throws an IOException
-
writeStartArray
void writeStartArray()Deprecated.Writes the start of a array to the writer.- Throws:
BsonInvalidOperationException- if not in the correct state to write a valueBSONException- if the underlying Writer throws an IOException
-
writeStartArray
Deprecated.Writes the start of JSON array member to the writer.- Parameters:
name- the member name- Throws:
BsonInvalidOperationException- if not in the correct state to write a memberBSONException- if the underlying Writer throws an IOException
-
writeStartObject
void writeStartObject()Deprecated.Writes the start of a JSON object to the writer.- Throws:
BsonInvalidOperationException- if not in the correct state to write a valueBSONException- if the underlying Writer throws an IOException
-
writeStartObject
Deprecated.Writes the start of a JSON object member to the writer.- Parameters:
name- the member name- Throws:
BsonInvalidOperationException- if not in the correct state to write a memberBSONException- if the underlying Writer throws an IOException
-
writeEndArray
void writeEndArray()Deprecated.Writes the end of a JSON array to the writer.- Throws:
BsonInvalidOperationException- if not in the correct state to write the end of an arrayBSONException- if the underlying Writer throws an IOException
-
writeEndObject
void writeEndObject()Deprecated.Writes the end of a JSON object to the writer.- Throws:
BsonInvalidOperationException- if not in the correct state to write the end of an objectBSONException- if the underlying Writer throws an IOException
-
isTruncated
boolean isTruncated()Deprecated.Return true if the output has been truncated due to exceeding any maximum length specified in settings.- Returns:
- true if the output has been truncated
- Since:
- 3.7
-