I am writing an applet that calls some JSON-RPC calls. I am using the Google JSON library (GSON) to pass the JSON response to the class. Thsi seems to work fine as it is, but when I use this code in my applet, it amazes me java.lang.reflect.reflectpermission. From what I read in this thread on SO, it seems that since GSON uses Reflection, I cannot use it in Applets unless I explicitly change the security policy. How can I get around this? I created a bunch of classes in my application and used the method Gson.fromJsonto pass it to the class. Is there a way to achieve the same functionality without rewriting half of my code.
(The complexity of working with JSON in Java seems to be in the league!)
Thanks in advance guys.
source
share