Open
Description
Based on the JSONPath Internet Draft, I recently wrote a CBORPath
implementation in Rust: https://github.com/dahomey-technologies/cborpath-rs.
The main difference between JSONPath
and my CBORPath
proposal is that CBORPath is itself represented as a valid CBOR expression.
Pros:
- Any valid
CBOR
value, including a byte string can be expressed in aCBORPath
expression. - A
CBOR
map key can be any validCBOR
value, not only text likeJSON
object names. Consequently, theJSONPath
name-selector is replaced by aCBORPath
key-selector. - An existing
CBOR
parser or deserializer is enough to validate aCBORPath
expression, no need to write neither a grammar nor a parser.
Cons:
- A
CBORPath
expression is more verbose than theJSONPath
equivalent
Thank you to give your thoughts about the proposal. I may take the time to write an Internet draft.
Michaël
PS: reddit post link
Metadata
Metadata
Assignees
Labels
No labels