Gin
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
gin_varianthelpers.h File Reference

Utility functions for working with JUCE var objects and their properties. More...

Classes

struct  Property
 Simple key-value pair structure for representing a property. More...
 
struct  juce::VarIterator
 Iterator for a var. More...
 
struct  juce::VarIterator::NamedValue
 

Namespaces

namespace  juce
 

Functions

juce::var getPropertyWithDefault (const juce::var &v, const juce::Identifier &i, const juce::var &defaultValue)
 Get a property value with a default fallback.
 
void setProperty (juce::var &v, const juce::Identifier &i, const juce::var &value)
 Set a property on a var object.
 
bool setJSONPointer (juce::var &v, juce::String pointer, const juce::var &newValue)
 Given a JSON array/object 'v', a string representing a JSON pointer, and a new property value 'newValue', updates 'v' where the property or array index referenced by the pointer has been set to 'newValue'.
 
juce::var getJSONPointer (const juce::var &v, juce::String pointer, const juce::var &defaultValue)
 Given a JSON array/object 'v', a string representing a JSON pointer, returns the value of the property or array index referenced by the pointer If the pointer cannot be followed, due to referencing missing array indices or fields, then this returns defaultValue.
 
juce::String removeJsonComments (const juce::String &input)
 Remove C-style and C++-style comments from a JSON string.
 
VarIterator juce::begin (const juce::var &)
 
VarIterator juce::end (const juce::var &)
 

Detailed Description

Utility functions for working with JUCE var objects and their properties.

Provides convenient accessors for extracting property names, values, and sets from var objects that contain DynamicObject data.