beautypg.com

BrightSign Object Reference Manual (FW 5.1) User Manual

Page 29

background image

21

floating point numbers, strings, roArray objects, and roAssociativeArray objects. The

ParseJson() method has

the following properties:

o Invalid will be returned if the string is not syntactically correct.
o Any roAssociativeArray objects that are returned will be case sensitive.
o An error will be returned if an roArray or roAssociativeArray is nested more than 256 levels deep.

Example: The following script demonstrates how to use

ParseJson() to process a JSON object containing the

titles and URLs of a set of images.

JSON Script

{
"photos" : [

{

"title" : "View from the hotel",

"url" : "

http://example.com/images/00012.jpg"

},

{

"title" : "Relaxing at the beach",

"url" : "

http://example.com/images/00222.jpg"

},

{

"title" : "Flat tire",

"url" : "

http://example.com/images/00314.jpg"

}

]
}

BrightScript