public final class JsonProcessing extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonProcessing.Builder
Fluent-API builder for
JsonProcessing. |
| Modifier and Type | Field and Description |
|---|---|
static MediaType |
APPLICATION_JAVASCRIPT
JSONP (JSON with Pending) can have this weird type.
|
static MediaType |
TEXT_JAVASCRIPT
And the corresponding (obsolete, yet widely supported) text type.
|
| Modifier and Type | Method and Description |
|---|---|
static JsonProcessing.Builder |
builder()
Fluent API builder to create instances of JSON-P.
|
static JsonProcessing |
create()
Provides a default instance for JSON-P readers and writers.
|
static JsonProcessing |
create(Map<String,?> jsonPConfig)
Create an instance with the provided JSON-P configuration.
|
static boolean |
isSupported(MediaType type)
Check whether the type is supported by JSON Processing.
|
Reader<JsonStructure> |
reader()
Returns a function (reader) converting
Publisher of ByteBuffers to
a JSON-P object. |
Reader<JsonStructure> |
reader(Charset charset)
Returns a function (reader) converting
Publisher of ByteBuffers to
a JSON-P object. |
Function<JsonStructure,Flow.Publisher<DataChunk>> |
writer()
|
Function<JsonStructure,Flow.Publisher<DataChunk>> |
writer(Charset charset)
|
public static final MediaType APPLICATION_JAVASCRIPT
public static final MediaType TEXT_JAVASCRIPT
public static boolean isSupported(MediaType type)
type - media type to checkpublic Reader<JsonStructure> reader()
Publisher of ByteBuffers to
a JSON-P object.
It is intended for derivation of others, more specific readers.
IllegalArgumentException in case of I/O error or
a JsonExceptionpublic Reader<JsonStructure> reader(Charset charset)
Publisher of ByteBuffers to
a JSON-P object.
It is intended for derivation of others, more specific readers.
charset - a charset to use charsetIllegalArgumentException in case of I/O error or
a JsonExceptionpublic Function<JsonStructure,Flow.Publisher<DataChunk>> writer(Charset charset)
charset - a charset to use or null for default charsetpublic Function<JsonStructure,Flow.Publisher<DataChunk>> writer()
public static JsonProcessing create()
public static JsonProcessing create(Map<String,?> jsonPConfig)
jsonPConfig - configuration of the processing librarypublic static JsonProcessing.Builder builder()
Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.