Java Check Json包含子json

时间:2019-01-12 03:04:14

标签: java json contains

Java-我有2个json数据,我将通过发布和调用来获取这些数据。

我如何验证Json 1是否包含Json 2的数据?

Json字符串1

[  
    {  
        "name":"John",
        "city":"Berlin",
        "cars":[  
            "audi",
            "bmw"
        ],
        "job":"Teacher"
    },
    {  
        "name":"Mark",
        "city":"Oslo",
        "cars":[  
            "VW",
            "Toyata"
        ],
        "job":"Doctor"
    }
]

Json字符串2

   {  
        "name":"John",
        "city":"Berlin",
        "cars":[  
            "audi",
            "bmw"
        ],
        "job":"Teacher"
    }

0 个答案:

没有答案