I have the data as username=abc&password=xyz. I want this to convert to json object so that I can pull the details from it using the keys username and password . How can it be done ?
Asked
Active
Viewed 57 times
0
Neeraj Nauni
- 5
- 1
- 5
-
you may find this useful - https://stackoverflow.com/questions/13592236/parse-a-uri-string-into-name-value-collection – radai Oct 04 '19 at 05:17
-
2Possible duplicate of [Convert (Parse) URL parameteres to JSON in Java](https://stackoverflow.com/questions/29381446/convert-parse-url-parameteres-to-json-in-java) – Sandeep Kokate Oct 04 '19 at 05:19
-
Why do you think you need to convert it? This is URL encoding, and most tools (even the bare Servlet API) will decode this for you. – chrylis -cautiouslyoptimistic- Oct 04 '19 at 05:31
-
You can simply transform the data into `Map`. – LHCHIN Oct 04 '19 at 06:26