I was given the task to implement a REST interface to make our Java application (wicket interface) to render ExtJS components and feed their stores using JSONs.

We have a infrastructure that can serialize a Java object into a JSON, but the problem is that it is really complex.

It's something like this:
Code:
class Person {
private String name;
}
Code:
{
"&type":"class","value":"full.qualified.name.Person","&type":"String","value":"SomeName"
}
The issue here is that we don't know how to follow. Either we change our infrastructure, create a new one, or try to do something in the Javascript side.

Do you guys have and toughts about this?