WL#8249: JSON comparator

Affects: Server-Prototype Only   —   Status: Complete

Goal of this WL is to introduce JSON comparator, similar to DATE/TIME/DATETIME comparator, that would allow comparisons of JSON scalars vs SQL constants, JSON scalars vs JSON scalars. The comparator would rely on the DOM built in scope of WL#7909.

The comparator will convert the SQL constant to a JSON scalar and compare the values. Rules are as following:
JSON scalar vs JSON scalar) true if the two scalars have the same type and the same value
JSON array/object vs JSON scalar) always false
JSON array vs JSON array) true if length and contents match
JSON object vs JSON object) true if they have the same set of keys, and the same associated values

It is not a goal of this WL to implement support for ordering JSON values using ORDER BY.