[MDEV-16375] Add JSON_NORMALIZE function to normalize JSON values Created: 2018-06-02  Updated: 2023-11-27  Resolved: 2021-09-12

Status: Closed
Project: MariaDB Server
Component/s: JSON
Fix Version/s: 10.7.0

Type: Task Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 0
Labels: beginner-friendly, gsoc21

Issue Links:
Blocks
Relates
relates to MDEV-28922 JSON_NORMALIZE handling of duplicate ... Open
relates to MDEV-23143 Add JSON_EQUALS function to check JSO... Closed
relates to MDEV-29026 ASAN use-after-poison in json_normal... Confirmed

 Description   

Background is this question on stackexchange:

https://dba.stackexchange.com/questions/208481/mariadb-compare-json

The task is to provide a function that can be used to compare 2 json documents for equality, then name can be e.g JSON_NORMALIZE

JSON_COMPACT already takes care of removing spaces, but this is not sufficient.
Keys need to be (recursively) sorted , and if spaces are removed, then documents can be compared as binary strings.



 Comments   
Comment by Hollow Man [ 2021-03-11 ]

Hi everyone, I want to work on this issue as a GSOC 21 participant, I have sent an email related to the issues explaining my ideas to the mail-list. Can anyone discuss with me about my ideas?

Comment by Vicențiu Ciorbaru [ 2021-04-01 ]

Hi hollowman86!

You have some of my thoughts in a reply here:

https://lists.launchpad.net/maria-developers/msg12629.html

Note that Pandas doesn't do what this MDEV describes, but I think that it can give you some ideas about potential challenges when working with JSON.

Generated at Thu Feb 08 08:28:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.