[#BloombergLP-baljsn-PrintUtil-printValue-023]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/PrintUtil.adoc[PrintUtil]::printValue
:relfileprefix: ../../../
:mrdocs:

Encode `value` into JSON and write it to `stream`&period;

== Synopses

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

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-082.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdldfp/Decimal64.adoc[bdldfp::Decimal64] value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-082.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-08f2.adoc[printValue](
    std::ostream& stream,
    bool value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-08f2.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0da.adoc[printValue](
    std::ostream& stream,
    char value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0da.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-084.adoc[printValue](
    std::ostream& stream,
    double value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-084.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0a7.adoc[printValue](
    std::ostream& stream,
    float value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0a7.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-089.adoc[printValue](
    std::ostream& stream,
    int value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-089.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-00c.adoc[printValue](
    std::ostream& stream,
    long value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-00c.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-08fc.adoc[printValue](
    std::ostream& stream,
    long long value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-08fc.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-096.adoc[printValue](
    std::ostream& stream,
    short value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-096.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0aa.adoc[printValue](
    std::ostream& stream,
    signed char value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0aa.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-09d.adoc[printValue](
    std::ostream& stream,
    unsigned char value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-09d.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-097.adoc[printValue](
    std::ostream& stream,
    unsigned int value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-097.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-07.adoc[printValue](
    std::ostream& stream,
    unsigned long value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-07.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0b1.adoc[printValue](
    std::ostream& stream,
    unsigned long long value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0b1.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0a5.adoc[printValue](
    std::ostream& stream,
    unsigned short value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0a5.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-093.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdlt/Date.adoc[bdlt::Date] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-093.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-00f.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/baljsn/PrintUtil/DateOrDateTz.adoc[DateOrDateTz] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-00f.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-08c.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdlt/DateTz.adoc[bdlt::DateTz] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-08c.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0de.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdlt/Datetime.adoc[bdlt::Datetime] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0de.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0c.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0c.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-08fe.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/baljsn/PrintUtil/DatetimeOrDatetimeTz.adoc[DatetimeOrDatetimeTz] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-08fe.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-05.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdlt/DatetimeTz.adoc[bdlt::DatetimeTz] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-05.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0f.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdlt/Time.adoc[bdlt::Time] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0f.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0bd.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/baljsn/PrintUtil/TimeOrTimeTz.adoc[TimeOrTimeTz] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0bd.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0e5.adoc[printValue](
    std::ostream& stream,
    xref:BloombergLP/bdlt/TimeTz.adoc[bdlt::TimeTz] const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0e5.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-0eb.adoc[printValue](
    std::ostream& stream,
    std::string&lowbar;view const& value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-0eb.adoc[_» more&period;&period;&period;_]#

Encode `value` into JSON and write it to `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/PrintUtil/printValue-02d.adoc[printValue](
    std::ostream& stream,
    char const* value,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/PrintUtil/printValue-02d.adoc[_» more&period;&period;&period;_]#

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| output stream for JSON
| *value*
| value to encode
| *options*
| encoding options&semi; null uses defaults
|===


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