[#nlohmann-basic_json-0c-to_bson-07]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0c.adoc[basic&lowbar;json]::to&lowbar;bson
:relfileprefix: ../../
:mrdocs:

create a BSON serialization of a given JSON value

== Synopsis

Declared in `&lt;nlohmann&sol;json&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::vector&lt;uint8&lowbar;t&gt;
to&lowbar;bson(xref:nlohmann/basic_json-0c.adoc[basic&lowbar;json] const& j);
----

== Return Value

a BSON serialization of _j_ as a byte vector

== Parameters

[cols="1,4"]
|===
| Name| Description
| *j*
| JSON value to serialize
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
