Is it possible to encode using json_encode() function in PHP a variable that is an object of class?
If yes then how can i get back the class object fields using gson in java:
Entry jsonElement.;
jsonElement.getValue.getAs…
The available functions getAsString,getAsInt.. etc are not useful in this case.
from http://www.json.org:
It is a data interchange format so it can be used by any language. That’s why for example you can use Twitter’s REST api from any language you like.
code:
output:
This json_string you can just import into the object you like.
From Java
Output