[#BloombergLP-baljsn-SimpleFormatter-addValue-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/SimpleFormatter.adoc[SimpleFormatter]::addValue
:relfileprefix: ../../../
:mrdocs:

`addValue` overloads

== Synopses

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

Print the specified `value` onto the stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/baljsn/SimpleFormatter/addValue-02.adoc[addValue](TYPE const& value);
----

[.small]#xref:BloombergLP/baljsn/SimpleFormatter/addValue-02.adoc[_» more&period;&period;&period;_]#

Print the specified `name` and `value` onto the stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/baljsn/SimpleFormatter/addValue-08.adoc[addValue](
    std::string&lowbar;view const& name,
    TYPE const& value);
----

[.small]#xref:BloombergLP/baljsn/SimpleFormatter/addValue-08.adoc[_» more&period;&period;&period;_]#

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| value to encode as JSON
| *name*
| member name for the value
|===


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