Package org.joda.beans.ser.json
Class JodaBeanJsonReader
- java.lang.Object
-
- org.joda.beans.ser.json.JodaBeanJsonReader
-
public class JodaBeanJsonReader extends Object
Provides the ability for a Joda-Bean to read from JSON.The JSON format is defined by
JodaBeanJsonWriter
.This class contains mutable state and cannot be used from multiple threads. A new instance must be created for each message.
-
-
Constructor Summary
Constructors Constructor Description JodaBeanJsonReader(JodaBeanSer settings)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bean
read(Reader input)
Reads and parses to a bean.<T> T
read(Reader input, Class<T> rootType)
Reads and parses to a bean.Bean
read(String input)
Reads and parses to a bean.<T> T
read(String input, Class<T> rootType)
Reads and parses to a bean.
-
-
-
Constructor Detail
-
JodaBeanJsonReader
public JodaBeanJsonReader(JodaBeanSer settings)
Creates an instance.- Parameters:
settings
- the settings, not null
-
-
Method Detail
-
read
public Bean read(String input)
Reads and parses to a bean.- Parameters:
input
- the input string, not null- Returns:
- the bean, not null
-
read
public <T> T read(String input, Class<T> rootType)
Reads and parses to a bean.- Type Parameters:
T
- the root type- Parameters:
input
- the input string, not nullrootType
- the root type, not null- Returns:
- the bean, not null
-
read
public Bean read(Reader input)
Reads and parses to a bean.- Parameters:
input
- the input reader, not null- Returns:
- the bean, not null
-
-