com.sun.jersey.api.json
Class JSONConfiguration.NaturalBuilder

java.lang.Object
  extended by com.sun.jersey.api.json.JSONConfiguration.Builder
      extended by com.sun.jersey.api.json.JSONConfiguration.NaturalBuilder
Enclosing class:
JSONConfiguration

public static class JSONConfiguration.NaturalBuilder
extends JSONConfiguration.Builder

Builder class for constructing JSONConfiguration options for the JSONConfiguration.Notation.NATURAL convention.


Field Summary
 
Fields inherited from class com.sun.jersey.api.json.JSONConfiguration.Builder
arrays, attrsAsElems, humanReadableFormatting, jsonXml2JsonNs, namespaceSeparator, nonStrings, rootUnwrapping, usePrefixAtNaturalAttributes
 
Method Summary
 JSONConfiguration.NaturalBuilder humanReadableFormatting(boolean humanReadableFormatting)
          If set to true, generated JSON will contain new-line characters and indentation, so that the output is easy to read for people.
 JSONConfiguration.NaturalBuilder rootUnwrapping(boolean rootUnwrapping)
          Setter for XML root element unwrapping.
 JSONConfiguration.NaturalBuilder usePrefixesAtNaturalAttributes()
          JSON names corresponding to XML attributes will be written using a '@' prefix This property is valid for the JSONConfiguration.Notation.NATURAL notation only.
 
Methods inherited from class com.sun.jersey.api.json.JSONConfiguration.Builder
build
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

rootUnwrapping

public JSONConfiguration.NaturalBuilder rootUnwrapping(boolean rootUnwrapping)
Setter for XML root element unwrapping. This property is valid for the JSONConfiguration.Notation.MAPPED and JSONConfiguration.Notation.NATURAL notations only.

If set to true, JSON code corresponding to the XML root element will be stripped out

The default value is false.

Parameters:
rootUnwrapping - if set to true, JSON code corresponding to the XML root element will be stripped out.
Returns:
the natural builder.

humanReadableFormatting

public JSONConfiguration.NaturalBuilder humanReadableFormatting(boolean humanReadableFormatting)
If set to true, generated JSON will contain new-line characters and indentation, so that the output is easy to read for people. This property is valid for the JSONConfiguration.Notation.NATURAL notation only.

The default value is false.

Parameters:
humanReadableFormatting -
Returns:
the natural builder.

usePrefixesAtNaturalAttributes

public JSONConfiguration.NaturalBuilder usePrefixesAtNaturalAttributes()
JSON names corresponding to XML attributes will be written using a '@' prefix This property is valid for the JSONConfiguration.Notation.NATURAL notation only.

Returns:
the natural builder.


Copyright © 2011 Oracle Corporation. All Rights Reserved.