-
Notifications
You must be signed in to change notification settings - Fork 33
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
CBORvalue, including a byte string can be expressed in aCBORPathexpression. - A
CBORmap key can be any validCBORvalue, not only text likeJSONobject names. Consequently, theJSONPathname-selector is replaced by aCBORPathkey-selector. - An existing
CBORparser or deserializer is enough to validate aCBORPathexpression, no need to write neither a grammar nor a parser.
Cons:
- A
CBORPathexpression is more verbose than theJSONPathequivalent
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