Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

gson parse json

Gson gson = new Gson();

// 1. Java object to JSON file
gson.toJson(obj, new FileWriter("C:fileName.json"));

// 2. Java object to JSON string
String json = gson.toJson(obj);
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #gson #parse #json
ADD COMMENT
Topic
Name
1+7 =