Last active
May 18, 2017 10:25
-
-
Save danielgustafsson/faed657971bd74bf3ecd0075340bd683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres=# select jsonx_build_object('{"o": {"foo":"bar", "apa":"tuta", "phone":["1",2]}}'); | |
jsonx_build_object | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
<json:object xsi:schemaLocation="http://www.datapower.com/schemas/json jsonx.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx">+ | |
<json:object name="o"> + | |
<json:string name="foo">bar</json:string> + | |
<json:string name="apa">tuta</json:string> + | |
<json:array name="phone"> + | |
<json:string>1</json:string> + | |
<json:number>2</json:number> + | |
</json:array> + | |
</json:object> + | |
</json:object> | |
(1 row) | |
postgres=# select xmlexists('//*[@name]' PASSING jsonx_build_object('{"o": {"foo":"bar", "apa":"tuta", "phone":["1",2]}}')); | |
xmlexists | |
----------- | |
t | |
(1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment