You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 a CBORPath expression.
A CBOR map key can be any valid CBOR value, not only text like JSON object names. Consequently, the JSONPath name-selector is replaced by a CBORPath key-selector.
An existing CBOR parser or deserializer is enough to validate a CBORPath expression, no need to write neither a grammar nor a parser.
Cons:
A CBORPath expression is more verbose than the JSONPath equivalent
Thank you to give your thoughts about the proposal. I may take the time to write an Internet draft.
Interesting! I'll look at this in more detail, but doing something like this certainly was in the cards.
We'll have a JSONPath interim meeting on Tuesday and a CBOR interim meeting on Wednesday; I'll make sure that this work gets some mention there (even if there isn't an Internet-Draft1 to discuss yet).
Footnotes
This is what we like to call our draft RFCs, because they aren't RFCs yet... ↩
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 myCBORPath
proposal is that CBORPath is itself represented as a valid CBOR expression.Pros:
CBOR
value, including a byte string can be expressed in aCBORPath
expression.CBOR
map key can be any validCBOR
value, not only text likeJSON
object names. Consequently, theJSONPath
name-selector is replaced by aCBORPath
key-selector.CBOR
parser or deserializer is enough to validate aCBORPath
expression, no need to write neither a grammar nor a parser.Cons:
CBORPath
expression is more verbose than theJSONPath
equivalentThank you to give your thoughts about the proposal. I may take the time to write an Internet draft.
Michaël
PS: reddit post link
The text was updated successfully, but these errors were encountered: