Package org.apache.juneau.marshaller
Class CharMarshaller
java.lang.Object
org.apache.juneau.marshaller.Marshaller
org.apache.juneau.marshaller.CharMarshaller
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal <T> TSame asMarshaller.read(Object,Class)but reads from a string and thus doesn't throw anIOException .final <T> TSame asMarshaller.read(Object,Type,Type...)but reads from a string and thus doesn't throw anIOException .final StringSerializes a POJO directly to aString .Methods inherited from class org.apache.juneau.marshaller.MarshallergetParser, getSerializer, read, read, write
- 
Constructor Details- 
CharMarshallerConstructor.- Parameters:
- s- The serializer to use for serializing output.
 Must not be- null .
- p- The parser to use for parsing input.
 Must not be- null .
 
 
- 
- 
Method Details- 
readSame asMarshaller.read(Object,Class)but reads from a string and thus doesn't throw anIOException .This is the preferred parse method for simple types since you don't need to cast the results. Examples:Marshaller marshaller = Json.DEFAULT ;// Parse into a string. Stringstring =marshaller .read(json , String.class );// Parse into a bean. MyBeanbean =marshaller .read(json , MyBean.class );// Parse into a bean array. MyBean[]beanArray =marshaller .read(json , MyBean[].class );// Parse into a linked-list of objects. Listlist =marshaller .read(json , LinkedList.class );// Parse into a map of object keys/values. Mapmap =marshaller .read(json , TreeMap.class );- Type Parameters:
- T- The class type of the object being created.
- Parameters:
- input- The input.
- type- The object type to create.
- Returns:
- The parsed object.
- Throws:
- ParseException- Malformed input encountered.
 
- 
readSame asMarshaller.read(Object,Type,Type...)but reads from a string and thus doesn't throw anIOException .- Type Parameters:
- T- The class type of the object to create.
- Parameters:
- input- The input.
- type- The object type to create.
 Can be any of the following:- ClassMeta,- Class,- ParameterizedType,- GenericArrayType
- args- The type arguments of the class if it's a collection or map.
 Can be any of the following:- ClassMeta,- Class,- ParameterizedType,- GenericArrayType
 Ignored if the main type is not a map or collection.
- Returns:
- The parsed object.
- Throws:
- ParseException- Malformed input encountered.
- See Also:
 
- 
writeSerializes a POJO directly to aString .- Parameters:
- object- The object to serialize.
- Returns:
- The serialized object.
- Throws:
- SerializeException- If a problem occurred trying to convert the output.
 
 
-