Package org.bson.json
Class StrictCharacterStreamJsonWriter
java.lang.Object
org.bson.json.StrictCharacterStreamJsonWriter
- All Implemented Interfaces:
StrictJsonWriter
@Deprecated(since="2022-10-31")
public final class StrictCharacterStreamJsonWriter
extends Object
implements StrictJsonWriter
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A class that writes JSON texts as a character stream via a provided
Writer.- Since:
- 3.5
-
Constructor Summary
ConstructorsConstructorDescriptionStrictCharacterStreamJsonWriter(Writer writer, StrictCharacterStreamJsonWriterSettings settings) Deprecated.Construct an instance. -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.Gets the current length of the JSON text.booleanDeprecated.Return true if the output has been truncated due to exceeding the length specified inStrictCharacterStreamJsonWriterSettings.getMaxLength().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.
-
Constructor Details
-
StrictCharacterStreamJsonWriter
public StrictCharacterStreamJsonWriter(Writer writer, StrictCharacterStreamJsonWriterSettings settings) Deprecated.Construct an instance.- Parameters:
writer- the writer to write JSON to.settings- the settings to apply to this writer.
-
-
Method Details
-
getCurrentLength
public int getCurrentLength()Deprecated.Gets the current length of the JSON text.- Returns:
- the current length of the JSON text
-
writeStartObject
Deprecated.Description copied from interface:StrictJsonWriterWrites the start of a JSON object member to the writer.- Specified by:
writeStartObjectin interfaceStrictJsonWriter- Parameters:
name- the member name
-
writeStartArray
Deprecated.Description copied from interface:StrictJsonWriterWrites the start of JSON array member to the writer.- Specified by:
writeStartArrayin interfaceStrictJsonWriter- Parameters:
name- the member name
-
writeBoolean
Deprecated.Description copied from interface:StrictJsonWriterWrites a a member with a boolean value to the writer.- Specified by:
writeBooleanin interfaceStrictJsonWriter- Parameters:
name- the member namevalue- the boolean value
-
writeNumber
Deprecated.Description copied from interface:StrictJsonWriterWrites a member with a numeric value to the writer.- Specified by:
writeNumberin interfaceStrictJsonWriter- Parameters:
name- the member namevalue- the Double value, as a String so that clients can take full control over formatting
-
writeString
Deprecated.Description copied from interface:StrictJsonWriterWrites a member with a string value to the writer.- Specified by:
writeStringin interfaceStrictJsonWriter- Parameters:
name- the member namevalue- the String value
-
writeRaw
Deprecated.Description copied from interface:StrictJsonWriterWrites a member with a raw value without quoting or escaping.- Specified by:
writeRawin interfaceStrictJsonWriter- Parameters:
name- the member namevalue- the raw value
-
writeNull
Deprecated.Description copied from interface:StrictJsonWriterWrites a member with a null value to the writer.- Specified by:
writeNullin interfaceStrictJsonWriter- Parameters:
name- the member name
-
writeName
Deprecated.Description copied from interface:StrictJsonWriterWrites the name of a member to the writer.- Specified by:
writeNamein interfaceStrictJsonWriter- Parameters:
name- the member name
-
writeBoolean
public void writeBoolean(boolean value) Deprecated.Description copied from interface:StrictJsonWriterWrites a boolean to the writer.- Specified by:
writeBooleanin interfaceStrictJsonWriter- Parameters:
value- the boolean value.
-
writeNumber
Deprecated.Description copied from interface:StrictJsonWriterWrites a number to the writer.- Specified by:
writeNumberin interfaceStrictJsonWriter- Parameters:
value- the Double value, as a String so that clients can take full control over formatting
-
writeString
Deprecated.Description copied from interface:StrictJsonWriterWrites a String to the writer.- Specified by:
writeStringin interfaceStrictJsonWriter- Parameters:
value- the String value
-
writeRaw
Deprecated.Description copied from interface:StrictJsonWriterWrites a raw value without quoting or escaping.- Specified by:
writeRawin interfaceStrictJsonWriter- Parameters:
value- the String value
-
writeNull
public void writeNull()Deprecated.Description copied from interface:StrictJsonWriterWrites a null value to the writer.- Specified by:
writeNullin interfaceStrictJsonWriter
-
writeStartObject
public void writeStartObject()Deprecated.Description copied from interface:StrictJsonWriterWrites the start of a JSON object to the writer.- Specified by:
writeStartObjectin interfaceStrictJsonWriter
-
writeStartArray
public void writeStartArray()Deprecated.Description copied from interface:StrictJsonWriterWrites the start of a array to the writer.- Specified by:
writeStartArrayin interfaceStrictJsonWriter
-
writeEndObject
public void writeEndObject()Deprecated.Description copied from interface:StrictJsonWriterWrites the end of a JSON object to the writer.- Specified by:
writeEndObjectin interfaceStrictJsonWriter
-
writeEndArray
public void writeEndArray()Deprecated.Description copied from interface:StrictJsonWriterWrites the end of a JSON array to the writer.- Specified by:
writeEndArrayin interfaceStrictJsonWriter
-
isTruncated
public boolean isTruncated()Deprecated.Return true if the output has been truncated due to exceeding the length specified inStrictCharacterStreamJsonWriterSettings.getMaxLength().- Specified by:
isTruncatedin interfaceStrictJsonWriter- Returns:
- true if the output has been truncated
- Since:
- 3.7
- See Also:
-