title: Convert a dot seperated string into a JSON Object
body: <p>So i have a dot seperated string which i am trying to convert into a JSON Object in JAVA. The structure is as follows.</p>
  
  <pre><code>Person.City.FirstNm.LastNm=xyz, Person.City.Address=abc. Person.City.firstNm.Salary=1000.24, Person.State.FirstNm.LastNm=xyz
  </code></pre>
  
  <p>and so on. The resulting JSON should be something like this. Note there can be a decimal point in the value.</p>
  
  <pre><code>{
      Person:
      {
          City:
          {
              firstNm:
              {
                  LastNm:xyz,
                          Salary:1000.24
              },
              Address: abc
          },
          State:
          {
              FirstNm:
              {
                  LastNm:xyz
              }
          }
      }
  }
  </code></pre>
  
  <p>I have tried to make a Map from the string and then use it to make a JSON string which i can use to make it as an Object but no luck. Any help would be appreciated. Thanks</p>