Martin2789, on 11 February 2014 - 03:37 PM, said:
Nice Api you have there i get it to work with easy json like:
What do i do wrong?
{
"firstline": "John",
"secline": "Doe",
"txtcol": "colors.white",
"backcol": "colors.blue"
}
withos.loadAPI("json")
str = http.get("http://www.someserver.com/").readAll()
obj = json.decode(str)
print(obj.firstline)
but with complicated json like:{
"monitornorth": [
{
"firstline": "John",
"secline": "Doe",
"txtcol": "colors.white",
"backcol": "colors.blue"
}
]
}
os.loadAPI("json")
str = http.get("http://www.someserver.com/").readAll()
obj = json.decode(str)
print(obj.monitornorth.firstline)
obj.monitornorth.firstline is emptyWhat do i do wrong?











