EclipseLink 2.4.0, build 'v20120509-r11325' API Reference

org.eclipse.persistence.jaxb
Class MarshallerProperties

java.lang.Object
  extended by org.eclipse.persistence.jaxb.MarshallerProperties

public class MarshallerProperties
extends java.lang.Object

These are properties that may be set on an instance of Marshaller. Below is an example of using the property mechanism to enable MOXy's JSON binding for an instance of Marshaller.

 Marshaller marshaller = jaxbContext.createMarshaller();
 marshaller.setProperty(MarshallerProperties.MEDIA_TYPE, "application/json");
 


Field Summary
static java.lang.String CHARACTER_ESCAPE_HANDLER
          The Constant CHARACTER_ESCAPE_HANDLER.
static java.lang.String INDENT_STRING
          The Constant INDENT_STRING.
static java.lang.String JSON_ATTRIBUTE_PREFIX
          The Constant JSON_ATTRIBUTE_PREFIX.
static java.lang.String JSON_INCLUDE_ROOT
          The Constant JSON_INCLUDE_ROOT.
static java.lang.String JSON_NAMESPACE_SEPARATOR
          The Constant JSON_NAMESPACE_SEPARATOR.
static java.lang.String JSON_VALUE_WRAPPER
          The Constant JSON_VALUE_WRAPPER.
static java.lang.String MEDIA_TYPE
          The Constant MEDIA_TYPE.
static java.lang.String NAMESPACE_PREFIX_MAPPER
          The Constant NAMESPACE_PREFIX_MAPPER.
 
Constructor Summary
MarshallerProperties()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHARACTER_ESCAPE_HANDLER

public static final java.lang.String CHARACTER_ESCAPE_HANDLER
The Constant CHARACTER_ESCAPE_HANDLER. Allows for customization of character escaping when marshalling. Value should be an implementation of org.eclipse.persistence.oxm.CharacterEscapeHandler.

See Also:
Constant Field Values
Since:
2.3.3

INDENT_STRING

public static final java.lang.String INDENT_STRING
The Constant INDENT_STRING. Property used to set the string used when indenting formatted marshalled documents. The default for formatted documents is " " (three spaces).

See Also:
Constant Field Values
Since:
2.3.3

JSON_ATTRIBUTE_PREFIX

public static final java.lang.String JSON_ATTRIBUTE_PREFIX
The Constant JSON_ATTRIBUTE_PREFIX. This can be used to specify a prefix to prepend to attributes. Only applicable if media type is "application/json".

See Also:
Constant Field Values
Since:
2.4

JSON_INCLUDE_ROOT

public static final java.lang.String JSON_INCLUDE_ROOT
The Constant JSON_INCLUDE_ROOT. This can be used to specify if the

See Also:
Constant Field Values
Since:
2.4

JSON_NAMESPACE_SEPARATOR

public static final java.lang.String JSON_NAMESPACE_SEPARATOR
The Constant JSON_NAMESPACE_SEPARATOR. This can be used to specify the separator that will be used when separating prefixes and localnames. Only applicable when namespaces are being used. Value should be a Character.

See Also:
Constant Field Values
Since:
2.4

JSON_VALUE_WRAPPER

public static final java.lang.String JSON_VALUE_WRAPPER
The Constant JSON_VALUE_WRAPPER. This can be used to specify the wrapper that will be used around things mapped with @XmlValue. Only applicable if media type is "application/json".

See Also:
Constant Field Values
Since:
2.4

MEDIA_TYPE

public static final java.lang.String MEDIA_TYPE
The Constant MEDIA_TYPE. This can be used to set the media type. Supported values are "application/xml" and "application/json".

See Also:
Constant Field Values
Since:
2.4

NAMESPACE_PREFIX_MAPPER

public static final java.lang.String NAMESPACE_PREFIX_MAPPER
The Constant NAMESPACE_PREFIX_MAPPER. Provides a means to customize the namespace prefixes used while marshalling to XML. Used for both marshal and unmarshal when mediaType is set to "application/json". Value is either a Map of URIs to prefixes, or an implementation of org.eclipse.persistence.oxm.NamespacePrefixMapper.

See Also:
Constant Field Values
Since:
2.3.3
Constructor Detail

MarshallerProperties

public MarshallerProperties()

EclipseLink 2.4.0, build 'v20120509-r11325' API Reference