Object2String_Gson

PHOTO EMBED

Fri Oct 29 2021 19:57:58 GMT+0000 (UTC)

Saved by @sagar #java

String jsonString = new com.google.gson.Gson().toJson(myObject);
content_copyCOPY

https://stackoverflow.com/questions/6055476/how-to-convert-object-to-string-in-java