X

JSON UDF functions version 0.3.1 have been released.

Guest Author

Today new version of JSON UDF functions: 0.3.1 was released. This is development release which contains new functionality. You can download
functions from the MySQL Labs website.

What is new?

Default value for compile option `WITH_PCRE` now is `bundled` independently from the
platform (Bug #71265/18081332 Library name mismatch for PCRE on Ubuntu)

New values, passed to functions `JSON_APPEND`, `JSON_REPLACE`, `JSON_SET` as numbers, empty strings or `NULL`s are converted to JSON objects. Objects, passed as strings are not converted: you are still responsible to put quotes around string values. Also these functions check if element which needs to be inserted is valid JSON value. (Bug #70394/17491708 MySQL JSON UDFs: json_replace can generate invalid target JSON)

README and ChangeLog files use Markdown format (Bug #71261/18023002 REFERENCES IN README MISSING)

`JSON_SEARCH` now accepts third argument: occurrence number, allowing to specify number of occurrence needed. (Bug #70607/17597479 ADD POSSIBILITY TO SEARCH ALL OCCURRENCES WITH JSON_SEARCH)

Added function `JSON_DEPTH` which returns depth of the JSON document.

Bugs fixed:


71510/18154696 `JSON_EXTRACT` returns wrong value if extracts from object which holds two arrays

71530/18160842 `JSON_EXTRACT` RETURNS WRONG RESULT IN VERSION 0.3

71949/18355404 `JSON_VALID` DOES NOT REJECT INVALID DOCUMENTS

70606/17596818 Implement SAFE versions for all JSON functions

And, of course, this release contains all changes made in version 0.2.2

Join the discussion

Comments ( 6 )
  • guest Thursday, June 26, 2014

    I'm trying to run the json_extract function through cmd bt I'm getting a error showing function db.json_extract donot exist what shud I do.??? Plzzz guide me..


  • Sveta Smirnova Wednesday, July 2, 2014

    You need to install functions first. Please read README file and use script install_jsonudf.sql


  • guest Thursday, July 31, 2014

    Possibly a bug (0.3.1):

    select json_set('{}', 'a', '"b"') => {} (empty object)

    expeted result:

    select json_set('{}', 'a', '"b"') => {"a":"b"}

    Thank you.


  • Sveta Smirnova Friday, August 1, 2014

    Yes, looks like a bug. Please report at bugs.mysql.com


  • Sveta Smirnova Wednesday, August 6, 2014

    Not needed, posted myself at http://bugs.mysql.com/bug.php?id=73486


  • guest Wednesday, November 12, 2014

    Issue seems fixed now


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.