[#BloombergLP-bdljsn-swap-085] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::swap :relfileprefix: ../../ :mrdocs: Exchange the value of the specified `a` `JsonObject` with that of the specified `b` `JsonObject`. This function provides the no‐throw exception‐safety guarantee. This operation has O[1]complexity if `a` was created with the same allocator as `b`; otherwise, it has O[n+m] complexity, where n and m are the number of elements in `a` and `b`, respectively. == Synopsis Declared in `<bdljsn_json.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap( xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject]& a, xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject]& b); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#