-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
搜索出JSONObject里面某个value对应的所有PATH #709
Milestone
Comments
为什么有这个需求?怎样的一个使用场景? |
类比的业务场景如下: {
"name": "test",
"members": [
{
"name": "name1"
"age": 12,
},
{
"name": "name2",
"age": 22,
}
],
"adminMembers" [
{
"name": "name3"
"age": 12,
},
{
"name": "name4",
"age": 22,
}
],
} 如上的一个json,我用这样的一个json来存储信息,一般情况下我知道path可以找出某个人的age,另外一种场景就是我现在知道一个人的name,想知道他的path,然后也就可以通过path知道这个人的信息以及其他信息了. |
wenshao
added a commit
that referenced
this issue
Jul 12, 2016
已经实现,方法是 public class JSONPath {
public static Map<String, Object> paths(Object javaObject);
} 看是否符合你的要求 |
满足~ |
asa1997
pushed a commit
to Be-Secure/fastjson
that referenced
this issue
Feb 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
一个JSONObject,递归遍历所有的叶子节点值,搜索出某个值对应的所有path返回,希望可以提供对应的方法直接使用.
The text was updated successfully, but these errors were encountered: