public class DocumentReaders extends Object
DocumentReader
.Constructor and Description |
---|
DocumentReaders() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
encode(DocumentReader reader)
Encodes values from the specified DocumentReader into a Java Map.
|
static List<Object> |
encodeArray(DocumentReader dr)
Encodes values from the specified DocumentReader into a Java Map.
This method should be called after consuming
DocumentReader.EventType.START_ARRAY . |
static Map<String,Object> |
encodeMap(DocumentReader dr)
Encodes values from the specified DocumentReader into a Java
List .
The difference between this method and encode(DocumentReader) is that
this should be called after consuming DocumentReader.EventType.START_MAP . |
static Object |
encodeValue(DocumentReader dr)
Returns the corresponding Java Object for the current node in
DocumentReader . |
public static Map<String,Object> encode(@API.NonNullable DocumentReader reader) throws EncodingException, TypeException
reader
- EncodingException
TypeException
public static Map<String,Object> encodeMap(DocumentReader dr) throws EncodingException, TypeException
List
.
The difference between this method and encode(DocumentReader)
is that
this should be called after consuming DocumentReader.EventType.START_MAP
.EncodingException
TypeException
public static List<Object> encodeArray(DocumentReader dr) throws EncodingException, TypeException
DocumentReader.EventType.START_ARRAY
.EncodingException
TypeException
public static Object encodeValue(DocumentReader dr) throws EncodingException, TypeException
DocumentReader
.EncodingException
TypeException
Value.getObject()
Copyright © 2015–2019 MapR Technologies, Inc.. All rights reserved.