Package org.frankframework.mongodb
Class StrictJsonDocumentWriter
java.lang.Object
org.frankframework.mongodb.StrictJsonDocumentWriter
- All Implemented Interfaces:
org.bson.json.StrictJsonWriter
StrictJsonWriter to write to FF DocumentBuilder, to generate JSON or XML.
Based on org.bson.json.StrictCharacterStreamJsonWriter.
- Author:
- Gerrit van Brakel
-
Constructor Summary
ConstructorDescriptionStrictJsonDocumentWriter
(INodeBuilder nodeBuilder, org.bson.json.StrictCharacterStreamJsonWriterSettings settings) Construct an instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the current length of the JSON text.boolean
Return true if the output has been truncated due to exceeding the length specified inStrictCharacterStreamJsonWriterSettings.getMaxLength()
.void
writeBoolean
(boolean value) void
writeBoolean
(String name, boolean value) void
void
void
void
void
void
writeNumber
(String value) void
writeNumber
(String name, String value) void
void
void
void
writeStartArray
(String name) void
void
writeStartObject
(String name) void
writeString
(String value) void
writeString
(String name, String value)
-
Constructor Details
-
StrictJsonDocumentWriter
public StrictJsonDocumentWriter(INodeBuilder nodeBuilder, org.bson.json.StrictCharacterStreamJsonWriterSettings settings) Construct an instance.- Parameters:
nodeBuilder
- the handler to write JSON to.settings
- the settings to apply to this writer.
-
-
Method Details
-
getCurrentLength
public int getCurrentLength()Gets the current length of the JSON text.- Returns:
- the current length of the JSON text
-
writeName
- Specified by:
writeName
in interfaceorg.bson.json.StrictJsonWriter
-
writeStartObject
public void writeStartObject()- Specified by:
writeStartObject
in interfaceorg.bson.json.StrictJsonWriter
-
writeStartObject
- Specified by:
writeStartObject
in interfaceorg.bson.json.StrictJsonWriter
-
writeEndObject
public void writeEndObject()- Specified by:
writeEndObject
in interfaceorg.bson.json.StrictJsonWriter
-
writeStartArray
public void writeStartArray()- Specified by:
writeStartArray
in interfaceorg.bson.json.StrictJsonWriter
-
writeStartArray
- Specified by:
writeStartArray
in interfaceorg.bson.json.StrictJsonWriter
-
writeEndArray
public void writeEndArray()- Specified by:
writeEndArray
in interfaceorg.bson.json.StrictJsonWriter
-
writeBoolean
public void writeBoolean(boolean value) - Specified by:
writeBoolean
in interfaceorg.bson.json.StrictJsonWriter
-
writeBoolean
- Specified by:
writeBoolean
in interfaceorg.bson.json.StrictJsonWriter
-
writeNumber
- Specified by:
writeNumber
in interfaceorg.bson.json.StrictJsonWriter
-
writeNumber
- Specified by:
writeNumber
in interfaceorg.bson.json.StrictJsonWriter
-
writeString
- Specified by:
writeString
in interfaceorg.bson.json.StrictJsonWriter
-
writeString
- Specified by:
writeString
in interfaceorg.bson.json.StrictJsonWriter
-
writeRaw
- Specified by:
writeRaw
in interfaceorg.bson.json.StrictJsonWriter
-
writeRaw
- Specified by:
writeRaw
in interfaceorg.bson.json.StrictJsonWriter
-
writeNull
public void writeNull()- Specified by:
writeNull
in interfaceorg.bson.json.StrictJsonWriter
-
writeNull
- Specified by:
writeNull
in interfaceorg.bson.json.StrictJsonWriter
-
isTruncated
public boolean isTruncated()Return true if the output has been truncated due to exceeding the length specified inStrictCharacterStreamJsonWriterSettings.getMaxLength()
.- Specified by:
isTruncated
in interfaceorg.bson.json.StrictJsonWriter
- Returns:
- true if the output has been truncated
- Since:
- 3.7
- See Also:
-
StrictCharacterStreamJsonWriterSettings.getMaxLength()
-