Package org.apache.juneau.marshall.json
Class BasicJsonWriter
java.lang.Object
java.io.Writer
org.apache.juneau.marshall.serializer.SerializerWriter<SELF>
org.apache.juneau.marshall.json.JsonWriter<BasicJsonWriter>
org.apache.juneau.marshall.json.BasicJsonWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
Concrete
JsonWriter leaf for standard JSON output.
This is the directly-instantiable form of JsonWriter, which is itself an abstract CRTP self-type base so it
can also be extended (e.g. by JcsWriter).
Notes:
- This class is not intended for external use.
-
Field Summary
Fields inherited from class org.apache.juneau.marshall.serializer.SerializerWriter
maxIndent, out, quoteChar, trimStrings, uriResolver, useWhitespace -
Constructor Summary
ConstructorsConstructorDescriptionBasicJsonWriter(Writer out, boolean useWhitespace, int maxIndent, boolean escapeSolidus, char quoteChar, boolean simpleAttrs, boolean trimStrings, UriResolver uriResolver) Constructor. -
Method Summary
Methods inherited from class org.apache.juneau.marshall.json.JsonWriter
attr, create, s, smi, stringValue, uriValue
-
Constructor Details
-
BasicJsonWriter
public BasicJsonWriter(Writer out, boolean useWhitespace, int maxIndent, boolean escapeSolidus, char quoteChar, boolean simpleAttrs, boolean trimStrings, UriResolver uriResolver) Constructor.- Parameters:
out- The writer being wrapped.useWhitespace- Iftrue , tabs and spaces will be used in output.maxIndent- The maximum indentation level.escapeSolidus- Iftrue , forward slashes should be escaped in the output.quoteChar- The quote character to use (i.e.'\'' or'"' )simpleAttrs- Iftrue , JSON attributes will only be quoted when necessary.trimStrings- Iftrue , strings will be trimmed before being serialized.uriResolver- The URI resolver for resolving URIs to absolute or root-relative form.
-