Allow javascript constuctor using @JSON contribution
Brought to you by:
charliehubbard
This patch adds constructor property to JSON annoation which is used by serializer.
For instance
@JSON(constructor = "new opensocial.Person")
public class Person implements Serializable {
...
}
will serialize this as
new opesocial.Person({...}) instead of {....}.
This produces invalid JSON. Embedding classes to be instantiated like this is a serious security hole. I could very easily get in the middle and send you a class to instantiate that would allow me to run remote code. For these two reasons I cannot accept this feature request and it will be closed.