1

I have an Array[Byte]. I am trying to convert it into JSON Object.

I tried using GSON library. I got the String representation of the JSON Object. I am stuck at this point and also not sure if this is the correct way.

def getJSONObject(array : Array[Byte]) : JSONObject = {
   val jsonString = new Gson().toJson(array)
}
cchantep
  • 9,118
  • 3
  • 30
  • 41
  • Possible duplicate of [How to convert jsonString to JSONObject in Java](https://stackoverflow.com/questions/5245840/how-to-convert-jsonstring-to-jsonobject-in-java) – Jonathan Myers Jun 21 '19 at 18:46

0 Answers0