I want to present this file in my java program.
What I want to do is quickly search by the value of "key", so, for example, given the value of P26 , I would like to return spouse .
Maybe I can read it as a HashMap using gson, as it was in this program.
But what to do with this awkward structure:
{ "properties": { "P6": "head of government", "P7": "brother", ...
How could I fit well in a HashMap ? Is HashMap best choice?
I simplified this a bit:
{ "P6": "head of government", "P7": "brother", "P9": "sister", "P10": "video", "P14": "highway marker", "P15": "road map", "P16": "highway system", "P17": "country", "P18": "image",
I tried to use this code, but it outputs null
String jsonTxt_P = null; File P_Value_file = new File("properties-es.json");
user2634655
source share