Package org.jsonex.jsoncoder
Interface ICoder<T>
-
- All Known Implementing Classes:
CoderArray,CoderAtomicInteger,CoderBigInteger,CoderClass,CoderCollection,CoderDate,CoderEnum,CoderMap,CoderObject,CoderURI,CoderURL,CoderXMLGregorianCalendar
public interface ICoder<T>Used for specific BeanCoder for certain types, such as Money, Date. This coder will convert between an Object and a TDNode representation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tdecode(TDNode jsonNode, Type type, Object targetObj, BeanCoderContext context)Decode an ObjectTDNodeencode(T obj, Type type, BeanCoderContext context, TDNode target)Encode an ObjectClass<T>getType()
-
-
-
Method Detail
-
encode
TDNode encode(T obj, Type type, BeanCoderContext context, TDNode target)
Encode an Object- Parameters:
obj- The Object to encodecontext- Encode contexttarget- The target json TDNode- Returns:
- The target passed as parameter
-
decode
T decode(TDNode jsonNode, Type type, Object targetObj, BeanCoderContext context)
Decode an Object- Parameters:
jsonNode- The json TDNode to be decodedtype- The target typecontext- Decode context- Returns:
- The decoded Object
-
-