github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_json_unquote.sql (about) 1 select json_unquote('"a\\n"'); 2 select json_unquote('"a\n"'); 3 select json_unquote('"a\t"'); 4 select json_unquote('"a\\u0000"'); 5 select json_unquote('"a\u0000"'); 6 select json_unquote('"aaxa"'); 7 select json_unquote('"a\\xa"'); 8 select json_unquote('"a\\u0000a"'); 9 select json_unquote('{"a":"b"}'); 10 select json_unquote('[1,2,3,null,true,false,"a",1.2,{"a":"1","b":2}]'); 11 select json_unquote('1'); 12 select json_unquote('1.2'); 13 select json_unquote('null'); 14 select json_unquote('true'); 15 select json_unquote('false'); 16 select json_unquote('"\\u554a\\u554a\\u5361\\u5361"'); 17 select json_unquote('"\\u4f60\\u597d\\uff0c\\u006d\\u006f"'); 18 select json_unquote('"\\u4f60\\u597d\\uff0cmo"'); 19 select json_unquote('"\\u4f60\\u597d\\ufc"'); 20 select json_unquote(json_extract('{"a":"b"}', '$.a')); 21 select json_unquote(json_extract('{"a":1}', '$.a')); 22 select json_unquote(null); 23 24 create table t1 (a varchar); 25 insert into t1 values ('"a\\u0000"'), ('"a\u0000"'), ('"aaxa"'), ('"a\\u0000a"'), ('{"a":"b"}'), ('[1,2,3,null,true,false,"a",1.2,{"a":"1","b":2}]'), ('1'), ('1.2'), ('null'), ('true'), ('false'), ('"\\u554a\\u554a\\u5361\\u5361"'), ('"\\u4f60\\u597d\\uff0c\\u006d\\u006f"'), ('"\\u4f60\\u597d\\uff0cmo"'), ('{"a":"b"}'), ('{"a":1}'),(null); 26 select json_unquote(a) from t1; 27 create table t2 (a json); 28 insert into t2 select a from t1; 29 select json_unquote(a) from t2; 30 31 32 33