can't use forward slash in json path selector #36
-
Is there any reason that this shouldn't work? {
"paths": {
"/path":"hello"
}
} json path:
result:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
As to why the RFC authors chose to disallow Here's the relevant part of the grammar for reference.
|
Beta Was this translation helpful? Give feedback.
$.paths['/path']
should work as expected..name
is the shorthand equivalent to['name']
or["name"]
, and the spec limits the characters allowed in the shorthand name selector. If we want to select a property by name and that name contains reserved/disallowed characters, we must use the longer form quoted name selector.As to why the RFC authors chose to disallow
/
, I'm not not sure 🤷♂️ .Here's the relevant part of the grammar for reference.