Switch to: V9V8V7V6V5

Differences

This shows you the differences between two versions of the page.

valentina:vcomponents:vsql:reference:expr:funcs_json [2019/04/10 10:25]
ivan
valentina:vcomponents:vsql:reference:expr:funcs_json [2019/04/10 10:28] (current)
ivan
Line 9: Line 9:
<code sql> <code sql>
SELECT json_build_array('foo',1,'bar',2, true) SELECT json_build_array('foo',1,'bar',2, true)
-=> '[\"foo\",1,\"bar\",2,true]'+=> '["foo",1,"bar",2,true]'
</code> </code>
Line 20: Line 20:
<code sql> <code sql>
SELECT json_build_object('foo',1,'bar',2) SELECT json_build_object('foo',1,'bar',2)
-=> '{\"foo\":1,\"bar\":2}'+=> '{"foo":1,"bar":2}'
</code> </code>
Line 45: Line 45:
<code sql> <code sql>
-SELECT json_format( '[{\"f1\":1,\"f2\":null},2,null,3]' ) +SELECT json_format( '[{"f1":1,"f2":null},2,null,3]' ) 
-=> [{\n\t\t\"f1\":\t1,\n\t\t\"f2\":\tnull\n\t}, 2, null, 3]+=> 
 +[{ 
 + "f1": 1, 
 + "f2": null 
 + }, 2, null, 3]
</code> </code>
Line 55: Line 59:
<code sql> <code sql>
-SELECT json_length( '[1,2,3,{\"f1\":1,\"f2\":[5,6]},4]' )+SELECT json_length( '[1,2,3,{"f1":1,"f2":[5,6]},4]' )
=> 5 => 5
</code> </code>
Line 69: Line 73:
=> 'number' => 'number'
</code> </code>
-