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

Json expression functions #8887

Merged
merged 5 commits into from
Jan 18, 2019
Merged

Json expression functions #8887

merged 5 commits into from
Jan 18, 2019

Conversation

m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented Jan 17, 2019

The current JSON expression functions only work with maps. There is no reason for that.

This PR adjusts the current functions so they also work with arrays, raw string values and whatever QJson may support.

There are also 2 aliases json_to_map is now also available as from_json and map_to_json is now also available as to_json. I'm not a huge fan of the names, suggestions welcome.

@m-kuhn m-kuhn changed the title Json functions Json expression functions Jan 17, 2019
@m-kuhn
Copy link
Member Author

m-kuhn commented Jan 17, 2019

Renamed the new aliases to be consistent with postgres: from_json and to_json

@nirvn
Copy link
Contributor

nirvn commented Jan 17, 2019

I can't remember for sure but I think I added json_to_map et cie during this development cycle. I don't mind seeing those aliases go away to keep only from_json / to_json.

@Gustry
Copy link
Contributor

Gustry commented Jan 17, 2019

json_to_map is in 3.4 already @nirvn

@nirvn
Copy link
Contributor

nirvn commented Jan 17, 2019

Wow, time passes by so fast.

@m-kuhn m-kuhn requested a review from nirvn January 17, 2019 13:32
@m-kuhn
Copy link
Member Author

m-kuhn commented Jan 17, 2019

Assigned to @nirvn as the author of the function ;P

@nyalldawson nyalldawson added this to the 3.6 milestone Jan 17, 2019
@nirvn nirvn merged commit 008dfee into qgis:master Jan 18, 2019
@m-kuhn m-kuhn deleted the json_functions branch January 18, 2019 10:45
@nirvn
Copy link
Contributor

nirvn commented Jan 18, 2019

@m-kuhn , all good stuff, merged 😄

@m-kuhn
Copy link
Member Author

m-kuhn commented Jan 18, 2019

Thanks @nirvn !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants