com.atlassian.confluence.ui.rest.json
Class OptionSerializer

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<com.atlassian.fugue.Option>
      extended by com.atlassian.confluence.ui.rest.json.OptionSerializer

public class OptionSerializer
extends org.codehaus.jackson.map.JsonSerializer<com.atlassian.fugue.Option>

Serialize fugue Option classes. Currently this works the same way the SoyData default serializer works - by converting either to an empty array or a single-element array. The plan is to migrate both serializations to remove the property if it is not resolved.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
org.codehaus.jackson.map.JsonSerializer.None
 
Constructor Summary
OptionSerializer()
           
 
Method Summary
 Class<com.atlassian.fugue.Option> handledType()
           
 void serialize(com.atlassian.fugue.Option option, org.codehaus.jackson.JsonGenerator jgen, org.codehaus.jackson.map.SerializerProvider provider)
           
 
Methods inherited from class org.codehaus.jackson.map.JsonSerializer
isUnwrappingSerializer, serializeWithType, unwrappingSerializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionSerializer

public OptionSerializer()
Method Detail

serialize

public void serialize(com.atlassian.fugue.Option option,
                      org.codehaus.jackson.JsonGenerator jgen,
                      org.codehaus.jackson.map.SerializerProvider provider)
               throws IOException,
                      org.codehaus.jackson.JsonProcessingException
Specified by:
serialize in class org.codehaus.jackson.map.JsonSerializer<com.atlassian.fugue.Option>
Throws:
IOException
org.codehaus.jackson.JsonProcessingException

handledType

public Class<com.atlassian.fugue.Option> handledType()
Overrides:
handledType in class org.codehaus.jackson.map.JsonSerializer<com.atlassian.fugue.Option>


Copyright © 2003–2015 Atlassian. All rights reserved.