Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Search the Community

Showing results for tags 'json'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Location


Interests

Found 1 result

  1. It seems completely funny but I am actually trying to get through this for the last 2 days: I try to access weather data through the OpenWeatherMap.org API wich seems to work fine with internet.request(url). The problem is just that it returns me the JSON as a table instead of a String. I tried to access fields of that table but everything seems to return nil. I just can't get to access anything from that table. There are tons of JSON serialization librarys out there but they all need the JSON as a String. I am completely lost rn. This is the API response that gets stored as a table for some reason: {"coord":{"lon":7.68,"lat":52.85},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"base":"stations","main":{"temp":10.51,"pressure":999,"humidity":66,"temp_min":10,"temp_max":11.11},"visibility":10000,"wind":{"speed":5.1,"deg":230},"rain":{"3h":0.11},"clouds":{"all":92},"dt":1552771115,"sys":{"type":1,"id":1871,"message":0.0045,"country":"DE","sunrise":1552714945,"sunset":1552757625},"id":2810860,"name":"Werlte","cod":200} My Lua code couldn't be simpler: local web = require("internet") local data = web.request(<API_LINK>) -- data is of type table and I don't know how to get any values. Tried so many combinations on indices. -- For each loop works to loop through everything though
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.