Class BasicJsonWriter

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public final class BasicJsonWriter extends JsonWriter<BasicJsonWriter>
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.
  • 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 - If true, tabs and spaces will be used in output.
      maxIndent - The maximum indentation level.
      escapeSolidus - If true, forward slashes should be escaped in the output.
      quoteChar - The quote character to use (i.e. '\'' or '"')
      simpleAttrs - If true, JSON attributes will only be quoted when necessary.
      trimStrings - If true, strings will be trimmed before being serialized.
      uriResolver - The URI resolver for resolving URIs to absolute or root-relative form.