I am trying to create a JSON as following format -
{
"approvable" : "true",
"approvedBy" : [user1, user2, user3, user4]
}
I have two java variables -
boolean approvable;
List<User> approvedBy;
If the approvedBy list contains all the Users, then can I make the JSON directly using any JSON library? Suppose I want to do something like this -
JsonBuilder jb = new JsonBuilder();
jb.add("approvable", true);
jb.add("approvedBy", approvedBy);
Ultimately, all I need to do is to simplifying the making of JSON. Can anyone suggest any good JSON library which give me this support?
Thanks in advance