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.