{"Entry":{"collection":"func","key":"row-to-json","name":"row_to_json","aliases":[],"metadata":{"changed_in":["9.3","9.4"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.1","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.2"},{"descriptions_changed":false,"doc_overhaul":false,"from":"9.2","group_changed":null,"signatures":{"added":["row_to_json ( record [, pretty_bool] ) → json"],"removed":["row_to_json ( record [, pretty_bool] )"]},"status":"changed","to":"9.3"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":["row_to_json ( record [, pretty_bool] )"],"removed":["row_to_json ( record [, pretty_bool] ) → json"]},"status":"changed","to":"9.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"13","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"14"}],"content_hash":"925699bf75301af0569694162e4011683662813da700bc39868bd7a67b718531","first_version":"9.2","group":"json","group_label":"Json Functions And Operators","groups":["json"],"imported_at":"2026-09-14T21:49:48.818297+08:00","last_version":"20","name":"row_to_json","name_key":"row_to_json","position":16058,"present_in":["9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"row_to_json ( record [, boolean ] ) → json","signature_count":1,"slug":"row-to-json","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"Converts an SQL composite value to a JSON object.","summary_zh":""}},"Definition":{"Collection":"func","Key":"row-to-json","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"row-to-json","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-JSON-CREATION-TABLE","file":"functions-json.html","slug":"18"},"group":"json","group_label":"Json Functions And Operators","lang":"en","layout":"table-new","pages":["functions-json.html"],"prose_only":false,"signatures":[{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_zh":"","description_zh_html":"","examples":[{"expr":"row_to_json(row(1,'foo'))","result":"{\"f1\":1,\"f2\":\"foo\"}"}],"html":"\u003ccode class=\"function\"\u003erow_to_json\u003c/code\u003e ( \u003ccode class=\"type\"\u003erecord\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"row_to_json ( record [, boolean ] ) → json","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-JSON-CREATION-TABLE","file":"functions-json.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"row-to-json","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"row_to_json","Summary":"将SQL 复合值转换为JSON对象。该行为与to_json相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","BodyHTML":"将SQL 复合值转换为JSON对象。该行为与\u003ccode\u003eto_json\u003c/code\u003e相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。\u003cpre\u003erow_to_json ( record [, boolean ] ) → json\u003c/pre\u003e将SQL 复合值转换为JSON对象。该行为与\u003ccode\u003eto_json\u003c/code\u003e相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","SourceRevision":"1b5ca64c","ContentHash":"21411db4039e64845c20b513e5ed0374b7f124745a3863233de16dac832e61b1","Payload":{"description_zh":"将SQL 复合值转换为JSON对象。该行为与to_json相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","description_zh_html":"将SQL 复合值转换为JSON对象。该行为与\u003ccode class=\"function\"\u003eto_json\u003c/code\u003e相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","signatures":[{"description_zh":"将SQL 复合值转换为JSON对象。该行为与to_json相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","description_zh_html":"将SQL 复合值转换为JSON对象。该行为与\u003ccode class=\"function\"\u003eto_json\u003c/code\u003e相同，只是如果可选布尔参数为真，换行符将在顶级元素之间添加。","returns":"json","text":"row_to_json ( record [, boolean ] ) → json","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"7adc3b346e320eaa1b9d446edf87a711675b671a9bbeb51ea7b455ef9b48b91e","Text":"row_to_json ( record [, boolean ] ) → json","Returns":"json","Payload":{"description":"Converts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_html":"Converts an SQL composite value to a JSON object. The behavior is the same as \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e except that line feeds will be added between top-level elements if the optional boolean parameter is true.","description_zh":"","description_zh_html":"","examples":[{"expr":"row_to_json(row(1,'foo'))","result":"{\"f1\":1,\"f2\":\"foo\"}"}],"html":"\u003ccode class=\"function\"\u003erow_to_json\u003c/code\u003e ( \u003ccode class=\"type\"\u003erecord\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"row_to_json ( record [, boolean ] ) → json","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
