Note that instances are fully immutable, and thereby thread-safe.
Note on source types: source to read is declared as java.
but covers following types:
InputStreamReaderbyte[]char[]String/CharSequenceURLFile| Modifier and Type | Class and Description |
|---|---|
| public static class | JSON.
Builder class that needs to be used for certain kind of "static" configuration
(settings that can not vary on per-call basis for |
| private static class | JSON.
Extension context implementation used when |
| public static enum | JSON.
Simple on/off (enabled/disabled) features for |
| Modifier and Type | Field and Description |
|---|---|
| protected final int | |
| protected final PrettyPrinter | |
| protected final JSONReader | _reader
Blueprint instance of the reader to use for reading JSON as simple Objects. |
| protected final TokenStreamFactory | _streamFactory
Underlying JSON factory used for creating Streaming parsers and generators. |
| protected final TreeCodec | _treeCodec
Optional handler for |
| protected final ValueReaderLocator | |
| protected final ValueWriterLocator | |
| protected final JSONWriter | _writer
Blueprint instance of the writer to use for writing JSON given simple Objects. |
| public static final int | |
| pack-priv static final int | |
| public static final JSON | std
Singleton instance with standard, default configuration. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| protected | JSON(JSON base, int features, TokenStreamFactory streamF, TreeCodec trees, JSONReader r, JSONWriter w, PrettyPrinter pp)
|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected final JsonGenerator | |
| protected final JsonParser | |
| protected JSONReader | |
| protected JSONWriter | |
| protected JsonParser | |
| protected void | |
| protected JsonParser | |
| protected JSONReader | |
| protected final JSON | |
| protected JSON | _with(int features, TokenStreamFactory jsonF, TreeCodec trees, JSONReader reader, JSONWriter writer, PrettyPrinter pp)
|
| protected final void | |
| protected JSONWriter | |
| public Object | anyFrom(Object source)
Read method that will take given JSON Source (of one of supported types),
read contents and map it to one of simple mappings ( |
| public ValueIterator | anySequenceFrom(Object source)
Method for creating |
| public Object[] | |
| public <T> T[] | |
| public byte[] | |
| public String | |
| public <T> T | |
| public <T> ValueIterator | beanSequenceFrom(Class<T> type, Object source)
Method for creating |
| public static JSON. | |
| public static JSON. | |
| public JSONComposer | |
| public <C extends Collection | |
| public CollectionComposer | |
| public MapComposer | |
| public MapComposer | |
| public JSONComposer | |
| public JSONComposer | |
| public JSONComposer | |
| public JSONComposer | |
| public JSONComposer | |
| public ArrayTreeNode | createArrayNode()
Implements tools. Convenience method, equivalent to: getTreeCodec().createArrayNode(); |
| public ObjectTreeNode | createObjectNode()
Implements tools. Convenience method, equivalent to: getTreeCodec().createObjectNode(); |
| public JsonParser | createParser(Object source)
Factory method for opening a
|
| public CharacterEscapes | |
| public int | getFormatReadFeatures(int defaults)
Implements tools.
|
| public int | getFormatWriteFeatures(int defaults)
Implements tools.
|
| public PrettyPrinter | getPrettyPrinter()
Implements tools. Accessor for getting |
| public SerializableString | getRootValueSeparator(SerializableString defaultSeparator)
Implements tools.
|
| public FormatSchema | |
| public int | getStreamReadFeatures(int defaults)
Implements tools.
|
| public int | getStreamWriteFeatures(int defaults)
Implements tools.
|
| public boolean | hasPrettyPrinter()
Implements tools. Accessor similar to |
| public final boolean | |
| public List | |
| public <T> List | |
| public Map | |
| public <T> Map | |
| public <T extends TreeNode> T | |
| public <T> T | readValue(JsonParser p, Class<T> valueType)
Implements tools.
|
| public <T> T | readValue(JsonParser p, TypeReference<T> valueTypeRef)
Implements tools.
|
| public <T> T | readValue(JsonParser p, ResolvedType type)
Implements tools.
|
| public StreamReadConstraints | |
| public TokenStreamFactory | |
| public TreeCodec | |
| public <T extends TreeNode> T | |
| public <T extends TreeNode> ValueIterator | treeSequenceFrom(Object source)
Method for creating |
| public Version | version()
Implements tools. Method called to detect version of the component that implements this interface;
returned version should never be null, but may return specific "not available"
instance (see |
| public JSON | Returns: New instance with specifiedPrettyPrinter (if not same as currently configured);
this otherwise.PrettyPrinter to use for pretty-printing output (of null to disable
pretty-printing)Mutant factory for constructing an instance with specified |
| public JSON | with(JSON.
Mutant factory for constructing an instance with specified feature
enabled or disabled (depending on |
| public JSON | |
| public JSON | with(MapBuilder b)
Mutant factory for constructing an instance with specified |
| public JSON | with(CollectionBuilder b)
Mutant factory for constructing an instance with specified |
| public JSON | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | writeTree(JsonGenerator g, TreeNode tree)
Implements tools.
|
| public void | writeValue(JsonGenerator g, Object value)
Implements tools. Method that may be called to serialize given value, using specified token stream generator. |