com.alibaba.dubbo.common.json
Class GenericJSONConverter

java.lang.Object
  extended by com.alibaba.dubbo.common.json.GenericJSONConverter
All Implemented Interfaces:
JSONConverter

public class GenericJSONConverter
extends Object
implements JSONConverter


Constructor Summary
GenericJSONConverter()
           
 
Method Summary
 Object readValue(Class<?> c, Object jv)
          convert json value to target class.
 void writeValue(Object obj, JSONWriter jb, boolean writeClass)
          write object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericJSONConverter

public GenericJSONConverter()
Method Detail

writeValue

public void writeValue(Object obj,
                       JSONWriter jb,
                       boolean writeClass)
                throws IOException
Description copied from interface: JSONConverter
write object.

Specified by:
writeValue in interface JSONConverter
Parameters:
obj - obj.
jb - builder.
Throws:
IOException

readValue

public Object readValue(Class<?> c,
                        Object jv)
                 throws IOException
Description copied from interface: JSONConverter
convert json value to target class.

Specified by:
readValue in interface JSONConverter
Parameters:
c - target type.
jv - json value.
Returns:
target object.
Throws:
IOException


Copyright © 2012–2017 Alibaba. All rights reserved.