title: Parsing a really complicated nested json whose structure is always changing in JAVA
body: <p>I have a really complicated nested json whose structure is always changing. I want to parse it in JAVA such that I can retrieve any element using the key/field name. </p>
  
  <p>Option 1 - The easiest way to do this would be to convert/parse the json into a JAVA object.
  I have tried everything (gson, JSONObject, Jackson...) But I cant convert the json unless I have a java class ready and since the json doesn't follow a fixed structure I cant convert it into a JAVA class. Is there any other library that can convert the json to a java object? (Without the need for a pre existing java class to convert the json into)</p>
  
  <p>Option 2 - Or is there a way/library I can use, which if given a portion of the json, the program prints all the elements in the json file. Something like this...</p>
  
  <pre><code>StreetAddressLine
  PrimaryTownName : value
  CountryISOAlpha2Code :value
  TerritoryAbbreviatedName :value
  PostalCode : value
  
  {"PrimaryAddress": [        {
            "StreetAddressLine": [{"LineText": "492 Koller St"}],
            "PrimaryTownName": "San Francisco",
            "CountryISOAlpha2Code": "US",
            "TerritoryAbbreviatedName": "CA",
            "PostalCode": "94110",
            "AddressUsageTenureDetail": [{"TenureTypeText":           {
              "@DNBCodeValue": 1129,
              "$": "Rents"
            }}],
            "PremisesUsageDetail": [{"PremisesUsageFunctionDetail": [{"PremisesFunctionText":           {
              "@DNBCodeValue": 12058,
              "$": "Manufacturing"
            }}]}],
            "CountyOfficialName": "San Francisco County",
            "TerritoryOfficialName": "California",
            "CountryGroupName": "North America",
            "GeographicalPrecisionText":           {
              "@DNBCodeValue": 0,
              "$": "Unknown"
            },
            "UndeliverableIndicator": false,
            "MetropolitanStatisticalAreaUSCensusCode": ["San Francisco-Oakland-Hayward CA"],
            "RegisteredAddressIndicator": false,
            "ResidentialAddressIndicator": false
          }]}
  </code></pre>
  
  <p>Thanks a lot!</p>