Convert a String to a JSON object in Java

Convert a string to a JSON object in Java

There is so much material out on the internet that I spent hours researching this.
Every single answer I found was not descriptive enough, and it seemed as though the only option there was to use the gson library

Here’s a very simple approach to convert a String to a JSON object without the need to download additional libraries

 

 

AND BAM!! That did the trick

Leave a Reply