com.atlassian.bamboo.jsonator
Class DefaultJsonator

java.lang.Object
  extended by com.atlassian.bamboo.jsonator.DefaultJsonator
All Implemented Interfaces:
Jsonator<java.lang.Object>

public class DefaultJsonator
extends java.lang.Object
implements Jsonator<java.lang.Object>

Converts a Java Bean to a JSON object. Delegates to correct ObjectJsonator.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.bamboo.jsonator.Jsonator
Jsonator.EnumConversionMode
 
Constructor Summary
DefaultJsonator()
           
 
Method Summary
 com.google.gson.JsonElement convert(java.lang.Object object)
          Creates a JsonElement representation of a given object.
 com.google.gson.JsonElement convert(java.lang.Object object, Jsonator.EnumConversionMode enumConversionMode)
          Creates a JsonElement representation of a given object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJsonator

public DefaultJsonator()
Method Detail

convert

public com.google.gson.JsonElement convert(java.lang.Object object)
Description copied from interface: Jsonator
Creates a JsonElement representation of a given object. Enums are converted to their names.

Specified by:
convert in interface Jsonator<java.lang.Object>
Parameters:
object - the object to be serialized
Returns:
Json JSON representation of the given object

convert

public com.google.gson.JsonElement convert(java.lang.Object object,
                                           Jsonator.EnumConversionMode enumConversionMode)
Description copied from interface: Jsonator
Creates a JsonElement representation of a given object

Specified by:
convert in interface Jsonator<java.lang.Object>
Parameters:
object - the object to be serialized
enumConversionMode - defines enum handling
Returns:
Json JSON representation of the given object


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.