T
- the data typepublic static class JsonFormat.Builder<T> extends Object
JsonFormat
.Constructor and Description |
---|
Builder(Class<T> dataType)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
JsonFormat<T> |
build()
Builds an instance.
|
JsonFormat.Builder<T> |
withCharset(Charset value)
Sets the charset.
|
JsonFormat.Builder<T> |
withEscapeNoAsciiCharacter(boolean value)
Sets whether or not no-ASCII characters should be escaped (for output only).
|
JsonFormat.Builder<T> |
withExclude(Pattern... values)
Adds property name patterns to ignore from input.
|
JsonFormat.Builder<T> |
withLineSeparator(LineSeparator value)
Sets the line separator (for output only).
|
JsonFormat.Builder<T> |
withOnUnknownInput(ErrorAction value)
Sets the error action of unknown properties.
|
<P> JsonFormat.Builder<T> |
withProperty(Function<? super T,? extends P> extractor,
PropertyDefinition<P> definition)
Adds a property.
|
JsonFormat.Builder<T> |
withUsePlainDecimal(boolean value)
Sets the decimal output style (for output only).
|
public <P> JsonFormat.Builder<T> withProperty(Function<? super T,? extends P> extractor, PropertyDefinition<P> definition)
P
- the property typeextractor
- the property extractordefinition
- the property definitionpublic JsonFormat.Builder<T> withExclude(Pattern... values)
values
- the property name patternspublic JsonFormat.Builder<T> withCharset(Charset value)
value
- the new valuepublic JsonFormat.Builder<T> withLineSeparator(LineSeparator value)
value
- the new valuepublic JsonFormat.Builder<T> withUsePlainDecimal(boolean value)
value
- true
if never use ten's exponentials, otherwise false
public JsonFormat.Builder<T> withEscapeNoAsciiCharacter(boolean value)
value
- true
if escape no-ASCII characters, otherwise false
public JsonFormat.Builder<T> withOnUnknownInput(ErrorAction value)
value
- the new valuepublic JsonFormat<T> build()
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.