在Java中编辑嵌套的json

时间:2018-12-22 11:24:48

标签: java json

我已经像这样嵌套json了:

{
    "cod": "200",
    "message": 0.0032,
    "cnt": 40,
    "list": [
        {
            "dt": 1545480000,
            "main": {
                "temp": 277.7,
                "temp_min": 268.758,
                "temp_max": 277.7,
                "pressure": 740.78,
                "sea_level": 1035.86,
                "grnd_level": 740.78,
                "humidity": 81,
                "temp_kf": 8.94
            },
            "weather": [
                {
                    "id": 800,
                    "main": "Clear",
                    "description": "clear sky",
                    "icon": "01d"
                }
            ],
            "clouds": {
                "all": 24
            },
            "wind": {
                "speed": 0.41,
                "deg": 271.507
            },
            "snow": {
                "3h": 0.0245
            },
            "sys": {
                "pod": "d"
            },
            "dt_txt": "2018-12-22 12:00:00"

,我想删除一些信息,例如“ cod”,“ message”,“ cnt”,“ dt”,“ sea_level”,并在列表中添加一些值,例如“ description”:“ snowing”或merg weather and main 。 我该怎么办?

0 个答案:

没有答案