com.atlassian.bamboo.jsonator.internal
Class ObjectJsonator

java.lang.Object
  extended by com.atlassian.bamboo.jsonator.internal.ObjectJsonator

@Internal
public class ObjectJsonator
extends Object

Converts a Java Bean to a JSON object.

The process is roughly as follows:

  1. Remove any AspectJ wrapping around the Bean,
  2. Call all getter methods on the Bean, storing to a Map
  3. As each getter is called, run the returned object through a jsonator specific to the object class (eg. Page)
  4. Each jsonator creates a JSON object implementing the Json interface
  5. Once all Bean properties are in the top-level JSON Object, the object is serialized recursively
The first step, calling the getter methods, is delegated to a JSONObject, which converts a bean Object into a JSONObject map.


Constructor Summary
ObjectJsonator(Jsonator.EnumConversionMode enumConversionMode)
           
 
Method Summary
 com.google.gson.JsonElement convert(Object bean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectJsonator

public ObjectJsonator(Jsonator.EnumConversionMode enumConversionMode)
Method Detail

convert

public com.google.gson.JsonElement convert(Object bean)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.