Skip to content
Advertisement

Convert String to javax.json.JsonValue

I have a JsonObject and I need to add new values to it. The values are Strings. There is a method available JsonObject.put(), which takes two variables:

  1. String Key.
  2. JsonValue value.

How to convert the String, which is in the JSON format, to JsonValue so that I can add it to the JsonObject?

Advertisement

Answer

this:

JavaScript
Advertisement