我有两个json文件completedata.json,一个具有完整数据,另一个具有过滤器数据filterdata.json。在应用过滤器后,我将在输出中获得过滤的json。因为我有非常大的json文件,所以如何使用Java Streaming API来实现它。
Input JSON completedata.json
==================================
{
"Person":[
{
"id":1,
"name":{
"first":"Kamran",
"last":"Aslam Khan"
},
"gender":"M",
"dOB":"01-01-1070",
"phone":{
"cC":"092",
"aC":"21",
"number":"2233445"
}
},
{
"id":2,
"name":{
"first":"Kanwal",
"last":"Sameer"
},
"gender":"F",
"dOB":"01-01-1075",
"phone":{
"cC":"092",
"aC":"21",
"number":"2233445"
}
},
{
"id":3,
"name":{
"first":"Kanwal",
"last":"Sameer"
},
"gender":"F",
"dOB":"01-01-1075",
"phone":{
"cC":"092",
"aC":"21",
"number":"2233445"
}
}
]
}
"Person":{
"id":[1,3]
}
{
"Person":[
{
"id":2,
"name":{
"first":"Kanwal",
"last":"Sameer"
},
"gender":"F",
"dOB":"01-01-1075",
"phone":{
"cC":"092",
"aC":"21",
"number":"2233445"
}
}
]
}