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

## Detailed Description

Allows formatting var objects as JSON with various configurable options.

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

- juce_core/json/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.

## Member Functions

## withSpacing()

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

inline

Returns a copy of this Formatter with the specified spacing.

References juce::withMember(), and x.

Referenced by juce::midi_ci::Encodings::jsonTo7BitText().

## 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.

References juce::withMember(), and x.

## 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.

References juce::withMember(), and x.

## withEncoding()

FormatOptions juce::JSON::FormatOptions::withEncoding | ( | Encoding | x | ) | const

inline

Returns a copy of this Formatter with the specified encoding.

Use this to force a JSON to be ASCII characters only.

References juce::withMember(), and x.

## getSpacing()

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

inline

Returns the spacing used by this Formatter.

## getMaxDecimalPlaces()

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

inline

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

## getIndentLevel()

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

inline

Returns the indent level of this Formatter.

## getEncoding()

Encoding juce::JSON::FormatOptions::getEncoding | ( |  | ) | const

inline

Returns the encoding of this Formatter.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited