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

Added uri_query_json() function #13

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

lacanoid
Copy link

@lacanoid lacanoid commented Apr 2, 2021

Added uri_query_json() function, to make individual uri query parameters conveniently accessible using json.
This is somewhat clumsy otherwise. JSON is natural for this and also allows for repeating keys.
Uriparser already provides a function for decomposing and decoding a query.
The rest is inspired by hstore_to_json() from hstore.c. Could use another look, to see if everything is ok.

Extension version updated to 1.1. Tests added.

@Florents-Tselai
Copy link

@petere, any chance of merging this? I've created a (slightly different / simpler) implementation for my purposes, but this looks more complete.

@Florents-Tselai
Copy link

@lacanoid I'd suggest working with jsonb instead of json

added -Wno-int-conversion
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

Successfully merging this pull request may close these issues.

3 participants