Using Gson to convert a string object to JSON string in Java
<p>Let's say we have the following string:</p>

<pre><code>String x = "abc";
</code></pre>

<p>My question is how would I use the Gson library to convert the given string, to the following JSON string:</p>

<pre><code>{
   x : "abc"
}
</code></pre>