beautypg.com

3 javascript object notation, 1 example – SMA SUNNY WEBBOX RPC User Manual

Page 7

background image

SMA Solar Technology AG

3  JavaScript Object Notation

User Manual

SWebBoxRPC-BA-en-14

7

3 JavaScript Object Notation

A description and explanation of JavaScript Object Notation (JSON) can be found on the website
http://www.json.org.

3.1 Example

The following example shows an illustration of a device list. It defines an object made up of the values
"totalDevicesReturned" and "devices".
"totalDevicesReturned" is a figure with the value 4. The array "device" has 2 fields, each having one
device object (see Section 6.1 "Device Object", page 12), which in turn contains nested device
objects.
RPC={
"totalDevicesReturned":4,
"devices":
[
{
"key":"SCC250H9:1390148531",
"name":"Sunny Central E1",
"children":
[
{
"key":"SCBFS016:8945",
"name":"Sunny BFS E1",
"children":null
},
{
"key":"SMU8b004:2567",
"name":"String Monitoring Unit E1",
"children":null
}
]
},
{
"key":"SCC250H9:1390148538",
"name":"Sunny Central E2",
"children":