title: How can I pass this String obtained to jsonObject format?
body: <p>Executing the code I get a String with the following value <code>"idStation=6107AAE80593E4B2&amp;timestamp=1558524847&amp;pm1=0.800&amp;pm2_5=1.510&amp;pm10=2.650&amp;temperature=22.380&amp;humidity=40.379&amp;pressure=93926.656&amp;luminosity=131&amp;coC=0.440923810000&amp;no2C=0.000000000000&amp;o3C=8.210327100000&amp;batteryLevel=27&amp;batteryCurrent=0&amp;baterryVolts=3.63"</code></p>
  
  <p>My goal is to convert that String into JsonObject format where each value is separated, that is, idstation = 6107AAE80593E4B2, etc., and to be able to continue treating the data later</p>
  
  <p>the idea is to take for example the value of no2 and save it in a variable of type (Map String, Object)</p>
  
  <pre><code>eventPayload.put ("no2", String.valueOf (no2));
  </code></pre>
  
  <p>the value of the string is coded in the variable "sinCifrar"</p>
  
  <p>I tried the following code, but I have problems:</p>
  
  <pre><code>'String jsonString = sinCifrar;
  JSONObject jsonk = new JSONObject(jsonString);
              no2 = (((jsonk.getDouble("pressure")/101325.0)*(jsonk.getDouble("no2C")/1000)*46.0055)/(0.082*(jsonk.getDouble("temperature")+273.15)))*1000000.0;
              co = (((jsonk.getDouble("pressure")/101325.0)*(jsonk.getDouble("coC")/1000)*28.01)/(0.082*(jsonk.getDouble("temperature")+273.15)))*1000000.0;
              o3 = (((jsonk.getDouble("pressure")/101325.0)*(jsonk.getDouble("o3C")/1000)*48.0)/(0.082*(jsonk.getDouble("temperature")+273.15)))*1000000.0;'
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
  </code></pre>
  
  <p>Since it is not a string created from the beginning, but it is obtained after executing several methods, I can not leave it with the requested format, any idea?</p>