Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By viscomjim
#39916 Howdy Mike,

Any update on this feature? I tried to make something work with openweathermap, but not quite the same as a true json parser. Here is a quick idea of what I was trying to do to get certain fields to display on an oled, but if the field has different length, it doesn't quite work exactly as planned...

Thanks again for all your hard work!!!

Code: Select allcls
button "Exit " [Exit]
timer 30000 [check]
wait
'
[check]
OWMString = "api.openweathermap.org/data/2.5/weather?id=4174855&units=imperial&appid=YOUROWMAPIKEY"
a$ = wget(OWMString)
serialprintln a$
b = instr(a$,"temp")
bx = b + 6
jtemp$ = mid(a$,bx,5)
serialprint "temp found = "
serialprintln jtemp$

b = instr(a$,"pressure")
bx = b + 10
jtemp$ = mid(a$,bx,4)
serialprint "pressure found = "
serialprintln jtemp$

b = instr(a$,"humidity")
bx = b + 10
jtemp$ = mid(a$,bx,2)
serialprint "humidity found = "
serialprintln jtemp$
wait
[Exit]
timer 0
wprint "<a href='/'>Menu</a>"
end
User avatar
By cwilt
#39936 Seems like we are barking up the same tree. I too am needing a JSON parser for weather, seismic, and space weather data. :D