Hi community!

I've had my proposal shared with 
https://drive.google.com/file/d/1sv0qbqt9W-ob3GqxygWwRGurpRS1lCiv/view , 
hope to get some feedback from the community.
 
Songlin
 
------------------ Original ------------------
From: &nbsp;"Hollow Man"<[email protected]&gt;;
Date: &nbsp;Thu, Mar 11, 2021 00:17 AM
To: &nbsp;"maria-developers"<[email protected]&gt;; 

Subject: &nbsp;GSOC21: MDEV-16375 &amp; MDEV-23143

&nbsp;

Hi MariaDB community!


&nbsp; &nbsp;Glad to be here! My github account is @HollowMan6. Though I'm new 
to MariaDB community, I'm interested in MDEV-16375 &amp; MDEV-23143: Function 
to normalize a json value &amp; missing a JSON_EQUALS function for this year's 
GSOC project. Here are my first thoughts on these issues:


&nbsp; &nbsp;I have checked part of the codebase and I think the two issues can 
be merged into one. First we can create a function named JSON_NORMALIZE to 
normalize the json, which automatically parses the inputed json document, 
recursively sorts the keys (for objects) / sorts the numbers (for arrays), 
removes the spaces, and then return the json document string.


&nbsp; &nbsp;Then we create a function named JSON_EQUALS, which can be used to 
compare 2 json documents for equality realized by first seperately normalize 
the two json documents using JSON_NORMALIZE, then the 2 can be compared exactly 
as binary strings.


&nbsp; &nbsp;I have taken some inspirations from the Item_func_json_keys and 
json_scan_start for parsing json documents, and I think it's possible to sort 
the keys using std::map in STL for objects.


&nbsp; &nbsp;That's all for my ideas so far. Please correct me if I made some 
mistakes, and I'm going to work on my ideas later.


Cheers!


Hollow Man
_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to