https://github.com/T-Pham/RokuJSONHelperNode
Roku SceneGraph JSON Helper
https://github.com/T-Pham/RokuJSONHelperNode
brightscript json roku roku-development safe scene-graph scenegraph
Last synced: 7 months ago
JSON representation
Roku SceneGraph JSON Helper
- Host: GitHub
- URL: https://github.com/T-Pham/RokuJSONHelperNode
- Owner: T-Pham
- Created: 2017-06-08T04:50:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-08T05:37:46.000Z (over 8 years ago)
- Last Synced: 2024-08-07T23:55:43.968Z (over 1 year ago)
- Topics: brightscript, json, roku, roku-development, safe, scene-graph, scenegraph
- Language: Brightscript
- Size: 27.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-video - T-Pham/RokuJSONHelperNode - Roku SceneGraph JSON Helper. (Build Tools, Deployment & Utility Libraries / API Libraries & SDKs)
README
JSON Helper Node for Roku.
Source files: [`/components/Helpers/`](/components/Helpers/)
Usage:
```brightscript
json = {
"people": [
{
"name": "John Appleseed",
"yob": 1999,
"phones": [
{
"name": "Nokia 3310",
"year_of_purchase": 2000
},
{
"name": "Nokia 3311",
"year_of_purchase": 2001
}
]
},
{
"name": "John Appleseed Jr.",
"yob": 2017,
"phones": []
}
]
}
jsonHelper = createObject("RoSGNode", "JSONHelper")
value = jsonHelper.callFunc("get", {json: json, path: ["people", 0, "phones", 1, "name"]}).value
? "first person's second phone name: "; value
invalidValue = jsonHelper.callFunc("get", {json: json, path: ["people", 1, "phones", 1, "name"]}).value
? "second person's second phone name: "; invalidValue
```