edu.internet2.middleware.grouper.ws.rest.json
Class XstreamJsonConverter

java.lang.Object
  extended by edu.internet2.middleware.grouper.ws.rest.json.XstreamJsonConverter
All Implemented Interfaces:
JsonConverter

public class XstreamJsonConverter
extends Object
implements JsonConverter

legacy (deprecated) json converter, doesnt always work correctly, sometimes can unmarshal things that it marshals


Constructor Summary
XstreamJsonConverter()
           
 
Method Summary
 Object convertFromJson(String json, StringBuilder warnings)
          convert a json string to an object.
 String convertToJson(Object object)
          convert an object to json.
 void convertToJson(Object object, Writer writer)
          convert an object to json.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XstreamJsonConverter

public XstreamJsonConverter()
Method Detail

convertFromJson

public Object convertFromJson(String json,
                              StringBuilder warnings)
Description copied from interface: JsonConverter
convert a json string to an object. note that only certain object are allowed to be marshaled from json, the aliases in WsRestClassLookup.getAliasClassMap()

Specified by:
convertFromJson in interface JsonConverter
warnings - put warnings here
Returns:
the object
See Also:
JsonConverter.convertFromJson(java.lang.String, StringBuilder)

convertToJson

public String convertToJson(Object object)
Description copied from interface: JsonConverter
convert an object to json. Note, there are only certian aliases which are allowed to be converted from json, so make sure to marshal the container object name somewhere (e.g. in the top level json object)

Specified by:
convertToJson in interface JsonConverter
Returns:
the json
See Also:
JsonConverter.convertToJson(java.lang.Object)

convertToJson

public void convertToJson(Object object,
                          Writer writer)
Description copied from interface: JsonConverter
convert an object to json. Note, there are only certian aliases which are allowed to be converted from json, so make sure to marshal the container object name somewhere (e.g. in the top level json object)

Specified by:
convertToJson in interface JsonConverter
Parameters:
object - to convert to json
writer - write the json here
See Also:
JsonConverter.convertToJson(java.lang.Object, java.io.Writer)