我有一个像下面这样的 JSON,并且有 JSONPath 例如,
"$[0].child_members[7].diamond.diamond_id" => Line number 55
"$[1].match_departments[0]" => Line number 83
我想在相应的 JSON 中找到 JSONPath 的行号。我正在使用 Jackson 和 JayWayPath 库,但无法弄清楚,有没有办法根据 JSONPath 找到行号。如果有人可以提出一些想法,我们将不胜感激。谢谢。
[
{
"facility": "Global",
"group_names": [
"H R"
],
"group_type": "department",
"remove_users_on_logout": false,
"shift_membership": {
"min": 50,
"max": 50,
"source": "any_shift",
"type": [
"auxiliary"
]
},
"child_members": [
{
"diamond": {
"diamond_id": "akron_hr"
}
},
{
"diamond": {
"diamond_id": "baltimore_hr"
}
},
{
"diamond": {
"diamond_id": "charlotte_hr"
}
},
{
"diamond": {
"diamond_id": "dallas_hr"
}
},
{
"diamond": {
"diamond_id": "elpaso_hr"
}
},
{
"diamond": {
"diamond_id": "houston_hr"
}
},
{
"diamond": {
"diamond_id": "greensboro_hr"
}
},
{
"diamond": {
"diamond_id": "houston_hr"
}
},
{
"diamond": {
"diamond_id": "knoxville_hr"
}
},
{
"diamond": {
"diamond_id": "lakewood_hr"
}
},
{
"diamond": {
"diamond_id": "madison_hr"
}
},
{
"diamond": {
"diamond_id": "nashville_hr"
}
}
]
},
{
"facility": "Akron",
"match_departments": [
"L T C",
"M I C U"
],
"child_members": [
{
"group_names": [
"Unit Alert"
],
"group_type": "ordinary",
"group_use": [
"unit_alert"
],
"remove_users_on_logout": false,
"name_format": "$department $name",
"shift_membership": {
"min": 12,
"max": 12,
"source": "per_shift",
"type": [
"clinician"
]
}
}
]
}
]