Loading...
Searching...
No Matches
juce::JSON::FormatOptions Class Reference

`#include <juce_JSON.h>`

## Public Member Functions

FormatOptions | withSpacing (Spacing x) const
FormatOptions | withMaxDecimalPlaces (int x) const
FormatOptions | withIndentLevel (int x) const
Spacing | getSpacing () const
int | getMaxDecimalPlaces () const
int | getIndentLevel () const

## Detailed Description

Allows formatting var objects as JSON with various configurable options.

Definition at line 101 of file juce_JSON.h.

## Member Function Documentation

## getIndentLevel()

int juce::JSON::FormatOptions::getIndentLevel | ( |  | ) | const

inline

Returns the indent level of this Formatter.

Definition at line 124 of file juce_JSON.h.

Referenced by juce::DynamicObject::writeAsJSON().

## getMaxDecimalPlaces()

int juce::JSON::FormatOptions::getMaxDecimalPlaces | ( |  | ) | const

inline

Returns the maximum number of decimal places used by this Formatter.

Definition at line 121 of file juce_JSON.h.

## getSpacing()

Spacing juce::JSON::FormatOptions::getSpacing | ( |  | ) | const

inline

Returns the spacing used by this Formatter.

Definition at line 118 of file juce_JSON.h.

Referenced by juce::DynamicObject::writeAsJSON().

## withIndentLevel()

FormatOptions juce::JSON::FormatOptions::withIndentLevel | ( | int | x | ) | const

inline

Returns a copy of this Formatter with the specified indent level. This should only be necessary when serialising multiline nested types.

Definition at line 115 of file juce_JSON.h.

Referenced by juce::DynamicObject::writeAsJSON().

## withMaxDecimalPlaces()

FormatOptions juce::JSON::FormatOptions::withMaxDecimalPlaces | ( | int | x | ) | const

inline

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.

Definition at line 110 of file juce_JSON.h.

## withSpacing()

FormatOptions juce::JSON::FormatOptions::withSpacing | ( | Spacing | x | ) | const

inline

Returns a copy of this Formatter with the specified spacing.

Definition at line 105 of file juce_JSON.h.

Referenced by juce::JSON::toString(), and juce::JSON::writeToStream().

The documentation for this class was generated from the following file:

- juce_JSON.h