Package net.minidev.json.writer
Class ArraysMapper<T>
- java.lang.Object
-
- net.minidev.json.writer.JsonReaderI<T>
-
- net.minidev.json.writer.ArraysMapper<T>
-
- Direct Known Subclasses:
ArraysMapper.GenericMapper
public class ArraysMapper<T> extends JsonReaderI<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArraysMapper.GenericMapper<T>
-
Field Summary
Fields Modifier and Type Field Description static JsonReaderI<Boolean[]>
MAPPER_BOOL
static JsonReaderI<Byte[]>
MAPPER_BYTE
static JsonReaderI<Character[]>
MAPPER_CHAR
static JsonReaderI<Double[]>
MAPPER_DOUBLE
static JsonReaderI<Float[]>
MAPPER_FLOAT
static JsonReaderI<Integer[]>
MAPPER_INT
static JsonReaderI<Long[]>
MAPPER_LONG
static JsonReaderI<boolean[]>
MAPPER_PRIM_BOOL
static JsonReaderI<byte[]>
MAPPER_PRIM_BYTE
static JsonReaderI<char[]>
MAPPER_PRIM_CHAR
static JsonReaderI<double[]>
MAPPER_PRIM_DOUBLE
static JsonReaderI<float[]>
MAPPER_PRIM_FLOAT
static JsonReaderI<int[]>
MAPPER_PRIM_INT
static JsonReaderI<long[]>
MAPPER_PRIM_LONG
static JsonReaderI<short[]>
MAPPER_PRIM_SHORT
static JsonReaderI<Short[]>
MAPPER_SHORT
-
Fields inherited from class net.minidev.json.writer.JsonReaderI
base
-
-
Constructor Summary
Constructors Constructor Description ArraysMapper(JsonReader base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(Object current, Object value)
add a value in an array json object.T
convert(Object current)
Allow a mapper to convert a temporary structure to the final data format.Object
createArray()
use to instantiate a new object that will be used as an array-
Methods inherited from class net.minidev.json.writer.JsonReaderI
createObject, getType, getValue, setValue, startArray, startObject
-
-
-
-
Field Detail
-
MAPPER_PRIM_INT
public static JsonReaderI<int[]> MAPPER_PRIM_INT
-
MAPPER_INT
public static JsonReaderI<Integer[]> MAPPER_INT
-
MAPPER_PRIM_SHORT
public static JsonReaderI<short[]> MAPPER_PRIM_SHORT
-
MAPPER_SHORT
public static JsonReaderI<Short[]> MAPPER_SHORT
-
MAPPER_PRIM_BYTE
public static JsonReaderI<byte[]> MAPPER_PRIM_BYTE
-
MAPPER_BYTE
public static JsonReaderI<Byte[]> MAPPER_BYTE
-
MAPPER_PRIM_CHAR
public static JsonReaderI<char[]> MAPPER_PRIM_CHAR
-
MAPPER_CHAR
public static JsonReaderI<Character[]> MAPPER_CHAR
-
MAPPER_PRIM_LONG
public static JsonReaderI<long[]> MAPPER_PRIM_LONG
-
MAPPER_LONG
public static JsonReaderI<Long[]> MAPPER_LONG
-
MAPPER_PRIM_FLOAT
public static JsonReaderI<float[]> MAPPER_PRIM_FLOAT
-
MAPPER_FLOAT
public static JsonReaderI<Float[]> MAPPER_FLOAT
-
MAPPER_PRIM_DOUBLE
public static JsonReaderI<double[]> MAPPER_PRIM_DOUBLE
-
MAPPER_DOUBLE
public static JsonReaderI<Double[]> MAPPER_DOUBLE
-
MAPPER_PRIM_BOOL
public static JsonReaderI<boolean[]> MAPPER_PRIM_BOOL
-
MAPPER_BOOL
public static JsonReaderI<Boolean[]> MAPPER_BOOL
-
-
Constructor Detail
-
ArraysMapper
public ArraysMapper(JsonReader base)
-
-
Method Detail
-
createArray
public Object createArray()
Description copied from class:JsonReaderI
use to instantiate a new object that will be used as an array- Overrides:
createArray
in classJsonReaderI<T>
-
addValue
public void addValue(Object current, Object value)
Description copied from class:JsonReaderI
add a value in an array json object.- Overrides:
addValue
in classJsonReaderI<T>
-
convert
public T convert(Object current)
Description copied from class:JsonReaderI
Allow a mapper to convert a temporary structure to the final data format. example: convert an List<Integer> to an int[]- Overrides:
convert
in classJsonReaderI<T>
-
-