I am trying to read a json file in java to order it. I know javascript and the way to read json in javascript is so easy to do what I want to do, json is just like an array. Is there a way to do something like that in java?
I just found gjson, json-lib, flexjson libraries and no one example about what I say, so I guess it is not possible to do it.
I need to do in java because it is for a restful server and it is all in java.
I guess I should have some classes to create all "things" inside json (in java) and put all of them in an array, after ordering them... But it makes me to have lot of classes which I don't.
Have you read the gson user guide?
https://sites.google.com/site/gson/gson-user-guide
I'd recommend using a JSon framework in Java, such as these examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With