Info
For legacy reasons tojson() output does not produce valid JSON, but some serialization of objects that is expected to be evaluable.
Currently, tojson(new Set([1, 2])) returns [1, 2], which evaluates to Array, but it should rather be "new Set([1, 2])". The same is with Map instances.