如何存储json文件中的特定数据并打印?

时间:2019-10-22 10:11:38

标签: python json store

我是python编程的新手,我想知道如何存储json文件中的数据特定数据。我想知道如何将数据存储在一对大括号之间,并打印一些信息。

这是json文件的一部分:

 "actual": {
    "$id": "3",
    "actualradarurl": "https://api.buienradar.nl/image/1.0/RadarMapNL?w=500&h=512",
    "sunrise": "2019-10-22T08:16:00",
    "sunset": "2019-10-22T18:31:00",
    "stationmeasurements": [
      {
        "$id": "4",
        "stationid": 6391,
        "stationname": "Meetstation Arcen",
        "lat": 51.5,
        "lon": 6.2,
        "regio": "Venlo",
        "timestamp": "2019-10-22T11:00:00",
        "weatherdescription": "Zwaar bewolkt",
        "iconurl": "https://www.buienradar.nl/resources/images/icons/weather/30x30/c.png",
        "graphUrl": "https://www.buienradar.nl/nederland/weerbericht/weergrafieken/c",
        "winddirection": "ZW",
        "temperature": 12.9,
        "groundtemperature": 13.1,
        "feeltemperature": 12.9,
        "windgusts": 5.4,
        "windspeed": 2.1,
        "windspeedBft": 2,
        "humidity": 88.0,
        "precipitation": 0.0,
        "sunpower": 72.0,
        "rainFallLast24Hour": 0.0,
        "rainFallLastHour": 0.0,
        "winddirectiondegrees": 225
      },
      {
        "$id": "5",
        "stationid": 6275,
        "stationname": "Meetstation Arnhem",
        "lat": 52.07,
        "lon": 5.88,
        "regio": "Arnhem",
        "timestamp": "2019-10-22T11:00:00",
        "weatherdescription": "Zwaar bewolkt",
        "iconurl": "https://www.buienradar.nl/resources/images/icons/weather/30x30/c.png",
        "graphUrl": "https://www.buienradar.nl/nederland/weerbericht/weergrafieken/c",
        "winddirection": "ZZW",
        "airpressure": 1023.8,
        "temperature": 12.5,
        "groundtemperature": 12.5,
        "feeltemperature": 11.0,
        "visibility": 5160.0,
        "windgusts": 5.2,
        "windspeed": 4.2,
        "windspeedBft": 3,
        "humidity": 96.0,
        "precipitation": 0.0,
        "sunpower": 34.0,
        "rainFallLast24Hour": 0.1,
        "rainFallLastHour": 0.0,
        "winddirectiondegrees": 211
      },

0 个答案:

没有答案