T - the data typepublic class JsonFormat<T> extends Object
JsonInput and JsonOutput.| Modifier and Type | Class and Description |
|---|---|
static class |
JsonFormat.Builder<T>
A builder for
JsonFormat. |
static class |
JsonFormat.InputOption
Options for input.
|
static class |
JsonFormat.OutputOption
Options for output.
|
| Modifier and Type | Field and Description |
|---|---|
static Charset |
DEFAULT_CHARSET
The default charset.
|
static boolean |
DEFAULT_ESCAPE_NO_ASCII_CHARACTER
The default behavior of whether or not escaping no-ASCII characters.
|
static Set<JsonFormat.InputOption> |
DEFAULT_INPUT_OPTIONS
The default input options.
|
static com.fasterxml.jackson.core.JsonFactory |
DEFAULT_JSON_FACTORY
The default
JsonFactory instance. |
static LineSeparator |
DEFAULT_LINE_SEPARATOR
The default line separator.
|
static ErrorAction |
DEFAULT_ON_UNKNOWN_INPUT
The default error action of unknown properties.
|
static Set<JsonFormat.OutputOption> |
DEFAULT_OUTPUT_OPTIONS
The default output options.
|
static boolean |
DEFAULT_USE_PLAIN_DECIMAL
The default behavior of whether or not use plain style to decimal numbers.
|
| Modifier | Constructor and Description |
|---|---|
protected |
JsonFormat(JsonFormat.Builder<T> builder)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> JsonFormat.Builder<T> |
builder(Class<T> dataType)
Creates a new builder.
|
JsonInput<T> |
open(String path,
InputStream input,
Collection<? extends JsonFormat.InputOption> options)
Opens
JsonInput for the given input. |
JsonOutput<T> |
open(String path,
OutputStream output,
Collection<? extends JsonFormat.OutputOption> options)
Opens
JsonOutput for the given output. |
JsonInput<T> |
open(String path,
Reader input,
Collection<? extends JsonFormat.InputOption> options)
Opens
JsonInput for the given input. |
JsonOutput<T> |
open(String path,
Writer output,
Collection<? extends JsonFormat.OutputOption> options)
Opens
JsonOutput for the given output. |
public static final com.fasterxml.jackson.core.JsonFactory DEFAULT_JSON_FACTORY
JsonFactory instance.public static final Charset DEFAULT_CHARSET
public static final LineSeparator DEFAULT_LINE_SEPARATOR
public static final boolean DEFAULT_USE_PLAIN_DECIMAL
public static final boolean DEFAULT_ESCAPE_NO_ASCII_CHARACTER
public static final ErrorAction DEFAULT_ON_UNKNOWN_INPUT
public static final Set<JsonFormat.InputOption> DEFAULT_INPUT_OPTIONS
public static final Set<JsonFormat.OutputOption> DEFAULT_OUTPUT_OPTIONS
protected JsonFormat(JsonFormat.Builder<T> builder)
builder - the builder of thispublic static <T> JsonFormat.Builder<T> builder(Class<T> dataType)
T - the data typedataType - the target data typepublic JsonInput<T> open(String path, InputStream input, Collection<? extends JsonFormat.InputOption> options) throws IOException
JsonInput for the given input.path - the source path nameinput - the source input streamoptions - input optionsJsonInputIOException - if I/O error was occurred while initializing the readerpublic JsonOutput<T> open(String path, OutputStream output, Collection<? extends JsonFormat.OutputOption> options) throws IOException
JsonOutput for the given output.path - the source path nameoutput - the destination output streamoptions - output optionsJsonOutputIOException - if I/O error was occurred while initializing the writerpublic JsonInput<T> open(String path, Reader input, Collection<? extends JsonFormat.InputOption> options) throws IOException
JsonInput for the given input.path - the source path nameinput - the source input readeroptions - input optionsJsonInputIOException - if I/O error was occurred while initializing the readerpublic JsonOutput<T> open(String path, Writer output, Collection<? extends JsonFormat.OutputOption> options) throws IOException
JsonOutput for the given output.path - the source path nameoutput - the destination output writeroptions - output optionsJsonOutputIOException - if I/O error was occurred while initializing the writerCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.