Reference+
Name
setJSONObject()
Class
JSONObject
Description
Sets the value of the JSONObject with the associated key.
Examples
- JSONObject json; void setup() { json = new JSONObject(); JSONObject lion = new JSONObject(); lion.setInt("id", 0); lion.setString("species", "Panthera leo"); json.setJSONObject("lion", lion); println(json); } // Sketch prints: // {"lion": { // "id": 0, // "species": "Panthera leo" // }}
Syntax
- .setJSONObject(key, value)
Parameters
- key- (String)a key string
- value- (JSONObject)value to assign
Return
- JSONObject

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.