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

Querying "JSON properties" #308

Closed
ralfhandl opened this issue Mar 20, 2024 · 0 comments · Fixed by oasis-tcs/odata-vocabularies#157
Closed

Querying "JSON properties" #308

ralfhandl opened this issue Mar 20, 2024 · 0 comments · Fixed by oasis-tcs/odata-vocabularies#157
Assignees

Comments

@ralfhandl
Copy link
Contributor

"JSON properties" are stream properties whose value is of media type application/json or one of its subtypes. They were introduced with ODATA-1177.

As outlined in OData Extension for JSON Data we need query capabilities on these properties.

Requirements:

  1. Specify a JSON Schema that describes/restricts the JSON stream values (ODATA-1275)
  2. Address parts of the JSON stream values in common expressions, e.g. in $filter, $compute, $orderby (this issue)

The second requirement can be solved via functions on JSON stream properties, e.g.

  • extract/compute an OData value (primitive, complex, collection) from a JSON stream
  • special case: extract/compute a JSON stream from a JSON stream
  • special case: extract/compute a Boolean value from a JSON stream

These functions can be inspired by (or be direct wrappers for) the SQL/JSON functions

PostgreSQL has its own set of JSON Functions and Operators.

Proposal

Define functions JSON.query and JSON.value specific to JSON stream properties in the new JSON vocabulary.

Imported from ODATA-1336

@ralfhandl ralfhandl self-assigned this Mar 20, 2024
This was linked to pull requests Apr 3, 2024
@HeikoTheissen HeikoTheissen removed a link to a pull request Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

1 participant