Page 1 of 1

JSON parse data

Posted: Fri Jan 06, 2017 4:09 pm
by Arbrakaan
Hi all,

I cant find the way to parse my multi-json object...

Code: Select all

"background": {
                "active":true,
                "selector":"body",
                "options": {
                    "background": {
                        "active":true,
                        "color": {
                            "r": 255, "g": 255, "b": 255, "a": 100, "rgba": "rgba(255, 255, 255, 1)", "hex": "FFFFFF"
                        }
                        ,
                        "image":[]
                    }
                    ,
                    "padding": {
                        "active": false, "top": false, "right": false, "bottom": false, "left": false
                    }
                }
            }
For the moment, i play with this little piece of code, but i cant go to the childe object, and i don't see how i must achieve that.
Any help is appreciated

Code: Select all

  ObjectValue = JSONValue(0)
  
  If ExamineJSONMembers(ObjectValue)
    While NextJSONMember(ObjectValue)
      Debug JSONMemberKey(ObjectValue)
    Wend
  EndIf
Thanks,

Arbrakaan

Re: JSON parse data

Posted: Sun Jan 08, 2017 10:14 am
by tj1010
https://developer.mozilla.org/en-US/doc ... JSON/parse

Then ex: obj.options.background.color.hex

or

use json member key like you did to see where you are then use a lot of states. Objecting it is way easier and uses less code.