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 package #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

panhania
Copy link

This is heavily inspired by #38 but fixes several issues we had with using that package:

  • sometimes incorrect invocations return NULL and sometimes they fail with an exception, for example SELECT JSON_EXTRACT_PATH_TEXT('{ "123": 123 }', '123.23'); exits abnormally while SELECT JSON_EXTRACT_PATH_TEXT('{ "foo": "bar" }', 'baz'); yields NULL
  • no support for array indexing
  • no support or well-defined behavior for weird cases like keys with dots or empty strings
  • performance issues (parsing string to an AST just to serialize it to JSON string again, many unnecessary heap allocations)

Our package, hopefully, solves all these and runs in constant memory doing no heap allocations. Refer to the README file and usage samples for more information.

The only caveat is very liberal custom JSON parser that often works with malformed JSONs (which may or may not be something you want).

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Łukasz Hanuszczak seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants