[#BloombergLP-baljsn-JsonConverter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::JsonConverter
:relfileprefix: ../../
:mrdocs:

This class provides a mechanism for copying the constituent values of certain `bdlat`&hyphen;compatible objects to `bdljsn&colon;&colon;Json` objects, and vice versa&period; In each case, the resulting object is a different representation of the data in the original&period; This conversion is analogous to the encoding and decoding operations provided elsewhere in this package&semi; however, the `convert` methods here avoid the creation of any textual representation of the data&period;

== Synopsis

Declared in `&lt;baljsn&lowbar;jsonconverter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class JsonConverter;
----

== Description

The `bdlat` objects must meet the requirements of a sequence, choice, or array as defined in `bdlat&lowbar;sequencefunctions`, `bdlat&lowbar;choicefunctions`, and `bdlat&lowbar;arrayfunctions` components, respectively&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baljsn/JsonConverter/allocator_type.adoc[`allocator&lowbar;type`] 
| This `typedef` is an alias for `allocator&lowbar;type`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baljsn/JsonConverter/2constructor-03.adoc[`JsonConverter`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/baljsn/JsonConverter/convert-06a.adoc[`convert`] 
| `convert` overloads
| xref:BloombergLP/baljsn/JsonConverter/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this object to supply memory&period; Note that if no allocator was supplied at construction the default allocator in effect at construction is used&period;
| xref:BloombergLP/baljsn/JsonConverter/loggedMessages.adoc[`loggedMessages`] 
| Return a string containing any error, warning, or trace messages that were logged during the last call to the `convert` method&period; The log is reset each time `convert` is called&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/baljsn/JsonConverter_ElementVisitor.adoc[BloombergLP::baljsn::JsonConverter&lowbar;ElementVisitor]`
| This `class` implements a visitor for decoding elements within a sequence, choice, or array type&period; This is a component&hyphen;private class and should not be used outside of this component&period; Note that the operators provided in this `class` match the function signatures required of visitors decoding into elements of compatible types&period;
|===


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