JSON.getDefault().addConvertor(Resource.class, new Convertor()
{
public void toJSON(Object obj, Output out)
{
Resource resource = (Resource) obj;
out.add("uri", resource.getUri());
}
public Object fromJSON(Map object) { return null; }
});
JSON.getDefault().addConvertor(EventResource.class, new Convertor()
{
public void toJSON(Object obj, Output out)
{
EventResource resource = (EventResource) obj;
out.add("uri", resource.getUri());
out.add("subscriptions", resource.getSubscriptions());
}
public Object fromJSON(Map object) { return null; }
});
JSON.getDefault().addConvertor(Subscription.class, new Convertor()
{