com.avaje.ebean.text.json
Class JsonReadOptions

java.lang.Object
  extended by com.avaje.ebean.text.json.JsonReadOptions

public class JsonReadOptions
extends Object

Provides the ability to customise the reading of JSON content.

You can optionally provide a custom JsonValueAdapter to handle specific formatting for Date and DateTime types.

You can optionally register JsonReadBeanVisitors to customise the processing of the beans as they are processed and handle any custom JSON elements that could not be mapped to bean properties.

Author:
rbygrave

Constructor Summary
JsonReadOptions()
          Default constructor.
 
Method Summary
 JsonReadOptions addRootVisitor(JsonReadBeanVisitor<?> visitor)
          Register a JsonReadBeanVisitor for the root level.
 JsonReadOptions addVisitor(String path, JsonReadBeanVisitor<?> visitor)
          Register a JsonReadBeanVisitor for a given path.
 JsonValueAdapter getValueAdapter()
          Return the JsonValueAdapter.
 Map<String,JsonReadBeanVisitor<?>> getVisitorMap()
          Return the map of JsonReadBeanVisitor's.
 JsonReadOptions setValueAdapter(JsonValueAdapter valueAdapter)
          Set a JsonValueAdapter for custom DateTime and Date formatting.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonReadOptions

public JsonReadOptions()
Default constructor.

Method Detail

getValueAdapter

public JsonValueAdapter getValueAdapter()
Return the JsonValueAdapter.


getVisitorMap

public Map<String,JsonReadBeanVisitor<?>> getVisitorMap()
Return the map of JsonReadBeanVisitor's.


setValueAdapter

public JsonReadOptions setValueAdapter(JsonValueAdapter valueAdapter)
Set a JsonValueAdapter for custom DateTime and Date formatting.


addRootVisitor

public JsonReadOptions addRootVisitor(JsonReadBeanVisitor<?> visitor)
Register a JsonReadBeanVisitor for the root level.


addVisitor

public JsonReadOptions addVisitor(String path,
                                  JsonReadBeanVisitor<?> visitor)
Register a JsonReadBeanVisitor for a given path.



Copyright © 2010. All Rights Reserved.