{"Entry":{"collection":"func","key":"json-strip-nulls","name":"json_strip_nulls","aliases":[],"metadata":{"changed_in":["18"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.5"},{"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":"17","group_changed":null,"signatures":{"added":["json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json"],"removed":["json_strip_nulls ( json ) → json"]},"status":"changed","to":"18"}],"content_hash":"0a551ad4f519c977285f5b2eaf108cdda2407e17807cb22249bcf80139e12749","derived_content_hash":"86b7542f056ec624e84ffc8c6ed67683d11de24a6d1fcf1368c71bb7b0177a48","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:dcb699c384a21971632cd600d7b30a3f4eb5f04c80cc31006eb99197849f81bb","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"9.5","group":"json","group_label":"Json Functions And Operators","groups":["json"],"imported_at":"2026-09-27T17:57:28.82676+08:00","last_version":"20","name":"json_strip_nulls","name_key":"json_strip_nulls","position":16020,"present_in":["9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"6da770c3b5060bc98be4ac4435ed7549796f347218aad7fa2df91805116d1c70","repair":"wiki-repair-20261023"},"signature":"json_strip_nulls ( target json [,strip_in_arrays boolean ] ) → json","signature_count":1,"slug":"json-strip-nulls","source_rev":"wiki-repair-20261023:dcb699c384a21971632cd600d7b30a3f4eb5f04c80cc31006eb99197849f81bb","summary":"Deletes all object fields that have null values from the given JSON value, recursively.","summary_zh":""}},"Definition":{"Collection":"func","Key":"json-strip-nulls","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"json-strip-nulls","SourceRevision":"wiki-repair-20261023:dcb699c384a21971632cd600d7b30a3f4eb5f04c80cc31006eb99197849f81bb","Facts":{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","doc":{"anchor":"FUNCTIONS-JSON-PROCESSING-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","version":"18.7"},{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"31b98fa7f00387abf441728c31918bfe8b368642bceeb8bba88a73c3fbd607de","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"json","group_label":"JSON 函数和操作符","lang":"en","layout":"table-new","pages":["functions-json.html"],"prose_only":false,"signatures":[{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","examples":[{"expr":"json_strip_nulls('[{\"f1\":1, \"f2\":null}, 2, null, 3]')","result":"[{\"f1\":1},2,null,3]"},{"expr":"jsonb_strip_nulls('[1,2,null,3,4]', true)","result":"[1,2,3,4]"}],"html":"\u003ccode class=\"function\"\u003ejson_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejson\u003c/code\u003e [\u003cspan class=\"optional\"\u003e,\u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"json_strip_nulls ( target json [,strip_in_arrays boolean] ) → json","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-json.html","sha256":"a412feb14a229f1d9f14fa2d7735255aa297d5eb8f2971d744d9dfee659c7cca"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-JSON-PROCESSING-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"json-strip-nulls","SourceDatabase":"center","Version":"18","Locale":"en","Title":"json_strip_nulls","Summary":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","BodyHTML":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","SourceRevision":"wiki-repair-20261023:dcb699c384a21971632cd600d7b30a3f4eb5f04c80cc31006eb99197849f81bb","ContentHash":"cb099c0fd7ea7eb1539bd2e66d09842ff4196c0d06e180bddae242cefdac11b6","Payload":{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","signatures":[{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","examples":[{"expr":"json_strip_nulls('[{\"f1\":1, \"f2\":null}, 2, null, 3]')","result":"[{\"f1\":1},2,null,3]"},{"expr":"jsonb_strip_nulls('[1,2,null,3,4]', true)","result":"[1,2,3,4]"}],"html":"\u003ccode class=\"function\"\u003ejson_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejson\u003c/code\u003e [\u003cspan class=\"optional\"\u003e,\u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"json_strip_nulls ( target json [,strip_in_arrays boolean] ) → json","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"8ce3266863c0fbbd87ecc78999195bd42e1ec1a7691240587c285fb903670bd5","Text":"json_strip_nulls ( target json [,strip_in_arrays boolean] ) → json","Returns":"json","Payload":{"description":"Deletes all object fields that have null values from the given JSON value, recursively. If strip_in_arrays is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_html":"Deletes all object fields that have null values from the given JSON value, recursively. If \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e is true (the default is false), null array elements are also stripped. Otherwise they are not stripped. Bare null values are never stripped.","description_zh":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 strip_in_arrays 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","description_zh_html":"递归地删除给定 JSON 值中所有值为 null 的对象字段。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e 为 true（默认值为 false），那么数组中的 null 元素也会被删除；否则不会删除。裸露的 null 值永远不会被删除。","examples":[{"expr":"json_strip_nulls('[{\"f1\":1, \"f2\":null}, 2, null, 3]')","result":"[{\"f1\":1},2,null,3]"},{"expr":"jsonb_strip_nulls('[1,2,null,3,4]', true)","result":"[1,2,3,4]"}],"html":"\u003ccode class=\"function\"\u003ejson_strip_nulls\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etarget\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ejson\u003c/code\u003e [\u003cspan class=\"optional\"\u003e,\u003cem class=\"parameter\"\u003e\u003ccode\u003estrip_in_arrays\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"json_strip_nulls ( target json [,strip_in_arrays boolean] ) → json","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
