Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"scripts not implemented yet" #195

Closed
blampe opened this issue Dec 29, 2024 · 3 comments
Closed

"scripts not implemented yet" #195

blampe opened this issue Dec 29, 2024 · 3 comments

Comments

@blampe
Copy link

blampe commented Dec 29, 2024

Are you considering implementing support for scripts?

ojg/jp/parse.go

Line 216 in 6b02545

p.raise("scripts not implemented yet")

@ohler55
Copy link
Owner

ohler55 commented Dec 29, 2024

OjG follows or attempts to follow the draft IETF spec for JSONPath (https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base). Currently there is not specification for what a script would look like or what language it should be in. JSONPath, like JSON was somewhat ill defined a decade ago and you might find some references to [( denoting the start of a script but as of today it is not defined in the IETF draft.

OjG has deviated from the draft specification in a few places to add additional features so defining a way to add scripts that is non-portable to other implementations is not out of the question but it probably needs some discussion on what that might look like. If you want to open a discussion item in https://github.com/ohler55/ojg/discussions. I'd be glad to do a little brainstorming with you and anyone else that want to join in.

@ohler55
Copy link
Owner

ohler55 commented Dec 30, 2024

I went ahead and implemented an approach to adding scripts. Please take a look at the "jp-proc" branch and see what you think.

@ohler55
Copy link
Owner

ohler55 commented Dec 31, 2024

Included in release v1.26.0.

@ohler55 ohler55 closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants