Loading...
Searching...
No Matches
Public Member Functions | List of all members
JSON::FormatOptions Class Reference

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

Detailed Description

Allows formatting var objects as JSON with various configurable options.

Member Function Documentation

◆ withSpacing()

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().

◆ withMaxDecimalPlaces()

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.

◆ withIndentLevel()

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.

◆ getSpacing()

Spacing JSON::FormatOptions::getSpacing ( ) const

Returns the spacing used by this Formatter.

◆ getMaxDecimalPlaces()

int JSON::FormatOptions::getMaxDecimalPlaces ( ) const

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

◆ getIndentLevel()

int JSON::FormatOptions::getIndentLevel ( ) const

Returns the indent level of this Formatter.


The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram