Create a SimpleFormatter that writes JSON to stream using encoderOptions.
Synopsis
Declared in <baljsn_simpleformatter.h>
explicit
SimpleFormatter(
std::ostream& stream,
EncoderOptions const& encoderOptions,
bslma::Allocator* basicAllocator = 0);
Description
Create a SimpleFormatter object using the specified stream. Optionally specify encoderOptions to configure the output options
-
if
encoderOptionsis not supplied, a default‐constructedEncoderOptionsobject will be used. Note that theencodeEmptyArraysattribute in theencoderOptionsis ignored. Optionally specify abasicAllocatorused to supply memory. IfbasicAllocatoris 0, the currently installed default allocator is used.
Parameters
Name |
Description |
stream |
output stream for formatted JSON |
encoderOptions |
options configuring JSON output |
basicAllocator |
memory allocator; null uses the default |
Created with MrDocs