Allows formatting var objects as JSON with various configurable options. More...
#include <juce_JSON.h>
Public Member Functions | |
FormatOptions | withSpacing (Spacing x) const |
Returns a copy of this Formatter with the specified spacing. | |
FormatOptions | withMaxDecimalPlaces (int x) const |
Returns a copy of this Formatter with the specified maximum number of decimal places. | |
FormatOptions | withIndentLevel (int x) const |
Returns a copy of this Formatter with the specified indent level. | |
FormatOptions | withEncoding (Encoding x) const |
Returns a copy of this Formatter with the specified encoding. | |
Spacing | getSpacing () const |
Returns the spacing used by this Formatter. | |
int | getMaxDecimalPlaces () const |
Returns the maximum number of decimal places used by this Formatter. | |
int | getIndentLevel () const |
Returns the indent level of this Formatter. | |
Encoding | getEncoding () const |
Returns the encoding of this Formatter. | |
Allows formatting var objects as JSON with various configurable options.
FormatOptions JSON::FormatOptions::withSpacing | ( | Spacing | x | ) | const |
Returns a copy of this Formatter with the specified spacing.
References withMember(), and x.
Referenced by midi_ci::Encodings::jsonTo7BitText().
FormatOptions JSON::FormatOptions::withMaxDecimalPlaces | ( | int | x | ) | const |
Returns a copy of this Formatter with the specified maximum number of decimal places.
This option determines the precision of floating point numbers in scientific notation.
References withMember(), and x.
FormatOptions JSON::FormatOptions::withIndentLevel | ( | int | x | ) | const |
Returns a copy of this Formatter with the specified indent level.
This should only be necessary when serialising multiline nested types.
References withMember(), and x.
FormatOptions JSON::FormatOptions::withEncoding | ( | Encoding | x | ) | const |
Returns a copy of this Formatter with the specified encoding.
Use this to force a JSON to be ASCII characters only.
References withMember(), and x.
Spacing JSON::FormatOptions::getSpacing | ( | ) | const |
Returns the spacing used by this Formatter.
int JSON::FormatOptions::getMaxDecimalPlaces | ( | ) | const |
Returns the maximum number of decimal places used by this Formatter.
int JSON::FormatOptions::getIndentLevel | ( | ) | const |
Returns the indent level of this Formatter.
Encoding JSON::FormatOptions::getEncoding | ( | ) | const |
Returns the encoding of this Formatter.