Rohit Bajaj
asked on
Difference between converting json to an object and xml to an object
Hi,
I have used a library Gson for converting a json into a Java object.
Also read about ways of converting xml to a java object. (eg. jaxb)
How do you compare these two libraries...
Is Gson a very well written library compared to jaxb...
Although they are doing different things.
But take for example i want user to enter some input which actually is a set of operations.
Now this input user can give me in XML format or JSON format.
Although i think XML format is more convenient for a user.
In both the cases i will process the input and convert it into a java object.
Which do you suggest is a good approach not from user point of view but from technology or efficiency point of view ?
Should i ask user to input XML or Json... which is better for handling and converting to an object....
Thanks
I have used a library Gson for converting a json into a Java object.
Also read about ways of converting xml to a java object. (eg. jaxb)
How do you compare these two libraries...
Is Gson a very well written library compared to jaxb...
Although they are doing different things.
But take for example i want user to enter some input which actually is a set of operations.
Now this input user can give me in XML format or JSON format.
Although i think XML format is more convenient for a user.
In both the cases i will process the input and convert it into a java object.
Which do you suggest is a good approach not from user point of view but from technology or efficiency point of view ?
Should i ask user to input XML or Json... which is better for handling and converting to an object....
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.