ietf-wg-jsonpath / draft-ietf-jsonpath-base

Development of a JSONPath internet draft
https://ietf-wg-jsonpath.github.io/draft-ietf-jsonpath-base/
Other
59 stars 20 forks source link

Function extension mechanism and several functions #280

Closed cabo closed 1 year ago

cabo commented 1 year ago

Weirdly, I cannot reply to this observation: https://github.com/ietf-wg-jsonpath/draft-ietf-jsonpath-base/pull/280#discussion_r1008936675

Expiry is somewhat unusual for IANA registries (early allocations do expire). What is the behavior you would expect implementations to exhibit? The function extension to stop working on the expiry day?

timbray commented 1 year ago

Hey @cabo, based on this useful-looking discussion, do you plan to revise this significantly? I'm wondering if I should give it a careful read now or wait for an updated version.

cabo commented 1 year ago

Definitely. Of course, I'd like to have your input on the points raised (the non-trivial ones). We might even want to have a design-team meeting...

timbray commented 1 year ago

Definitely. Of course, I'd like to have your input on the points raised (the non-trivial ones). We might even want to have a design-team meeting...

Might be a good idea to mark the non-non-trivial issues above resolved, to help reviewer focus. If it's OK, I'll wait for the next revision to go end-to-end. Agreed on a design meeting.

cabo commented 1 year ago

Here's my list of items where we could use input:

Probably mostly resolved:

glyn commented 1 year ago

@cabo: I rebased this and resolved some conflicts.

cabo commented 1 year ago

Update:

Here's my list of items where we could use input:

  • More frugal with allowing whitespace?

Address whitespace in a separate PR, if desired.

  • return value of functions that don't get the right arguments (e.g., length(1))

➔ Semantic issue: What to do with value of wrong kind?

Fixed in 08dd7ad

  • IANA designated expert instructions (frugal with "good" names)

Fixed in afda44a

  • expiring reservations? (shades of certificates)

Probably not.

  • domain of length (arrays now, add strings, objects?)?

➔ Semantic issue: What to do with value of wrong kind?

  • should there be another function for the size of nodelists (size())?

Yes, that is called count() now (e3a565a)

Probably mostly resolved:

  • [a-z][_a-z0-9]* for function names (ASCII, lowercase, _ only)

Let's stick with that name space.

glyn commented 1 year ago
  • return value of functions that don't get the right arguments (e.g., length(1))

➔ Semantic issue: What to do with value of wrong kind?

We may be able to make this syntactically invalid. See https://github.com/ietf-wg-jsonpath/draft-ietf-jsonpath-base/pull/320 for some ideas.