mysql - How to parse every object in my array in json in java without using loop? -
i have data in json format :
{ "father" :"conor", "children" : [ { "name":"cindy", "age": 11 }, { "name":"heart", "age" :12 }, { "name":"cindy", "age" :13 } ] }
my problem how going check every object in array children if there name , age field. currently, looped out check if 2 field supplied/exist, slows down app(especially when inserting database). there way don't have loop out?
you can use jsonpath api in java code , provides various filters on stream of json array. can give try
Comments
Post a Comment