showing results for - "build json object in java"
Michelle
08 Jan 2021
1String jsonString = new JSONObject()
2                  .put("JSON1", "Hello World!")
3                  .put("JSON2", "Hello my World!")
4                  .put("JSON3", new JSONObject().put("key1", "value1"))
5                  .toString();
6
7System.out.println(jsonString);
8
Alejandra
29 May 2017
1String json = Json.createObjectBuilder()
2            .add("key1", "value1")
3            .add("key2", "value2")
4            .build()
5            .toString();
6
queries leading to this page
how to create a json from java objecthow to n json object in javacreate json with json javabuild json javahow to create json in javamake json object in javajava create json objectjson object creation in java java build jsonhow to build json in javahow to use json javahow to make a json object in javacreating json object in javause json in javahow to use json and javahow to craete an object in java using jsonhow to create new jsonobject javausing json in javacreate an json object in javacreate object of json javajava make json itemjava jsonobject createcreate json object javajava create a json cretae json with org json javacreate jsonobject javajava simple jsongenerate json in javasimple jsonobject to java objectjson object create in javajava make jsonobjecthow to construct json object in javajava create jsonobjectcreate json object from java objectbuild json in javajava make json objectcreate json from java simple object classjava creating json objectsjava working create jsonmake json objet javacreate json javahow to create a json in javajava build json object from stringcreate json with javahow to make a json in javahow to create a json javahow to create json object from object in javahow to create a json object in javacreate object from json javahow to make json javacreate a json object using javacreating json objects in javacreate a java object from json objecthow to create object from json in javajava how to create json objectcraete json object in javacreate json object from object javahow to make a json on javahow to create json object in java with examplehow to create json object in javahow create json in javacreate json using javacreate json from java object classcreate json objects javajson object in java tutorial writing jsonobject in javagenerate a json in javajava create a json objectmake your own json javacreate java object from jsoncreate a json object in javagenerate json javajava create json objectsjava create jsonjava build in jsoncreate json object in javajson build javacreating json object from java objectmake json object java how to make json object in javacreate a new json object javacreate json from object javahjava create json objectjava create jason objectjava new jsonobjectcreating json in javajava create jsonobjectscreate a json in javajava json createjava jsonobject makegenerate json from object javacreate json onbjects in javacreating a json in javacreate json in javabuild json object in java