简体   繁体   中英

Json-path json extractor that consist from nodes with fullstop in their names

I use com.jayway.jsonpath:json-path for quick accessing and modifying nodes.

Example of pattern is: "$.dnode.meta" helps to manage data on meta node level that located inside of dnode . Example of json is:

{
  "dnode": {
    "meta": "some value"
  }
}

I faced with json like:

{
  "dnode.meta": "some value"
}

And I need help to construct path where node name contains full stop.

I tried next examples but they do not work for me:

  • "$.[dnode.meta]"
  • "$.\\'dnode.meta\\'"
  • "$.\\"dnode.meta\\""
  • "$.dnode\\.meta" ...

is any ideas how to construct path with json node that includes . ?

您可以尝试使用"$['dnode.meta']"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM