public class SimplePartSerializer extends BaseHttpPartSerializer
HttpPartSerializer
that simply serializes everything using Object.toString()
.
More precisely, uses the ClassUtils.toString(Object)
method to stringify objects.
HttpPartSerializer.Null
Modifier and Type | Field and Description |
---|---|
static SimplePartSerializer |
DEFAULT
Reusable instance of
SimplePartSerializer , all default settings. |
Constructor and Description |
---|
SimplePartSerializer() |
Modifier and Type | Method and Description |
---|---|
SimplePartSerializerSession |
createPartSession(SerializerSessionArgs args)
Creates a new serializer session.
|
String |
serialize(HttpPartType partType,
HttpPartSchema schema,
Object value)
Convenience method for creating a no-arg session and serializing a part.
|
createPartSession, serialize
public static final SimplePartSerializer DEFAULT
SimplePartSerializer
, all default settings.public SimplePartSerializer()
public SimplePartSerializerSession createPartSession(SerializerSessionArgs args)
HttpPartSerializer
args
- The runtime arguments for the session.public String serialize(HttpPartType partType, HttpPartSchema schema, Object value) throws SchemaValidationException, SerializeException
HttpPartSerializer
partType
- The category of value being serialized.schema
- Schema information about the part.
value
- The value being serialized.SchemaValidationException
- If the output fails schema validation.SerializeException
- If a problem occurred while trying to parse the input.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.