JSON parse data

Just starting out? Need help? Post your questions and find answers here.
User avatar
Arbrakaan
Posts: 91
Joined: Mon Feb 24, 2014 10:54 pm
Location: Geneva
Contact:

JSON parse data

Post 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
tj1010
Posts: 218
Joined: Wed May 27, 2015 1:36 pm
Contact:

Re: JSON parse data

Post 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.
Post Reply