org.joda.beans.ser.json
Class JodaBeanSimpleJsonReader

java.lang.Object
  extended by org.joda.beans.ser.json.JodaBeanSimpleJsonReader

public class JodaBeanSimpleJsonReader
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
JodaBeanSimpleJsonReader(JodaBeanSer settings)
          Creates an instance.
 
Method Summary
<T> T
read(Reader input, Class<T> rootType)
          Reads and parses to a bean.
<T> T
read(String input, Class<T> rootType)
          Reads and parses to a bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JodaBeanSimpleJsonReader

public JodaBeanSimpleJsonReader(JodaBeanSer settings)
Creates an instance.

Parameters:
settings - the settings, not null
Method Detail

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 null
rootType - the root type, not null
Returns:
the bean, not null

read

public <T> T read(Reader input,
                  Class<T> rootType)
Reads and parses to a bean.

Type Parameters:
T - the root type
Parameters:
input - the input reader, not null
rootType - the root type, not null
Returns:
the bean, not null


Copyright © 2007–2017 Joda.org. All rights reserved.