[#BloombergLP-ball-RecordJsonFormatter] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::RecordJsonFormatter :relfileprefix: ../../ :mrdocs: This class provides a function object that formats a log record as JSON text elements and renders them to an output stream. == Synopsis Declared in `<ball_recordjsonformatter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class RecordJsonFormatter; ---- == Description The overloaded `operator()` provided by the class formats log record according to a message format specification supplied either by `setJsonFormat` or `setSimplifiedFormat` manipulator or the default format installed by the constructor) and outputs the result to the stream. While this functor type is designed to match the function signature expected by many concrete `ball::Observer` implementations that publish log records (for example, see `ball::FileObserver2::setLogFileFunctor`) it is advised to use the more flexible scheme‐based format selection provided now by every BDE‐made observer. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/RecordJsonFormatter/FieldFormatters.adoc[`FieldFormatters`] | `FieldFormatters` is an alias for a vector of field‐formatter pointers. | xref:BloombergLP/ball/RecordJsonFormatter/allocator_type.adoc[`allocator_type`] | This `typedef` is an alias for the allocator used by this object. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/RecordJsonFormatter/SpecSyntax.adoc[`SpecSyntax`] | Enumerator to determine the syntax of the specification string. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/RecordJsonFormatter/2constructor-04.adoc[`RecordJsonFormatter`] [.small]#[constructor]# | Constructors | xref:BloombergLP/ball/RecordJsonFormatter/2destructor.adoc[`~RecordJsonFormatter`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/ball/RecordJsonFormatter/operator_assign-01.adoc[`operator=`] | Assignment operators | xref:BloombergLP/ball/RecordJsonFormatter/allocator.adoc[`allocator`] [.small]#[deprecated]# | DEPRECATED: Use `get_allocator().mechanism()` instead. | xref:BloombergLP/ball/RecordJsonFormatter/format.adoc[`format`] | Return the message format specification of this record JSON formatter. | xref:BloombergLP/ball/RecordJsonFormatter/formatSyntax.adoc[`formatSyntax`] | Return the message format specification syntax of this record JSON formatter. See {`Record Format Specification`}. | xref:BloombergLP/ball/RecordJsonFormatter/get_allocator.adoc[`get_allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/ball/RecordJsonFormatter/operator_call.adoc[`operator()`] | Format the specified `record` according to the current `format` and `recordSeparator` to the specified `stream`. | xref:BloombergLP/ball/RecordJsonFormatter/recordSeparator.adoc[`recordSeparator`] | Return the record separator of this record JSON formatter. | xref:BloombergLP/ball/RecordJsonFormatter/setFormat.adoc[`setFormat`] | DEPRECATED: Use `setJsonFormat` instead. | xref:BloombergLP/ball/RecordJsonFormatter/setJsonFormat.adoc[`setJsonFormat`] | Set this formatter's JSON message format specification to `format`. | xref:BloombergLP/ball/RecordJsonFormatter/setRecordSeparator.adoc[`setRecordSeparator`] | Set the record separator for this record JSON formatter to the specified `recordSeparator`. | xref:BloombergLP/ball/RecordJsonFormatter/setSimplifiedFormat.adoc[`setSimplifiedFormat`] | Parse a simplified format specification and configure this formatter. | xref:BloombergLP/ball/RecordJsonFormatter/setTimezoneDefault.adoc[`setTimezoneDefault`] | Set the default time zone for timestamps without a timezone in the format. | xref:BloombergLP/ball/RecordJsonFormatter/timezoneDefault.adoc[`timezoneDefault`] | Get the time zone default setting. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/RecordJsonFormatter/loadJsonSchemeFormatter.adoc[`loadJsonSchemeFormatter`] | Configure a "json"‐scheme formatter and load it into `output`. | xref:BloombergLP/ball/RecordJsonFormatter/loadQjsonSchemeFormatter.adoc[`loadQjsonSchemeFormatter`] | Configure a "qjson"‐scheme formatter and load it into `output`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/operator_not_eq-0c.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` record formatters do not have the same value, and `false` otherwise. | xref:BloombergLP/ball/operator_eq-0f06.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` record formatters have the same value, and `false` otherwise. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#