com.endeca.infront.serialization
Class JsonSerializer

java.lang.Object
  extended by com.endeca.infront.serialization.JsonSerializer

public class JsonSerializer
extends Object

A class for serializing java objects to JSON. The following objects can be serialized.

Circular references will throw an Exception.

The following rules apply.


Constructor Summary
JsonSerializer(Writer pWriter)
          Create a JsonSerializer with the given Writer.
 
Method Summary
 void write(Object pObject)
          Serialize the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonSerializer

public JsonSerializer(Writer pWriter)
Create a JsonSerializer with the given Writer.

Parameters:
pWriter - The writer to be used as a character stream
Method Detail

write

public void write(Object pObject)
           throws IOException
Serialize the given object.

Parameters:
pObject - The object to be serialized
Throws:
IOException - Any exception thrown by the underlying writer.


Copyright © 2012. All Rights Reserved.