JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
StrictVariantConverter< Type > Struct Template Reference
juce_core » javascript

A helper type that can be used to implement specialisations of VariantConverter that use FromVar::convert and ToVar::convert internally. More...

`#include <juce_JSONSerialisation.h>`

## Static Public Member Functions
static Type | fromVar (const var &v)
static var | toVar (const Type &t)

## Detailed Description

template<typename Type>
struct StrictVariantConverter< Type >

A helper type that can be used to implement specialisations of VariantConverter that use FromVar::convert and ToVar::convert internally.

If you've already implemented SerialisationTraits for a specific type, and don't want to write a custom VariantConverter that duplicates that implementation, you can instead write:

template <>
struct juce::VariantConverter<MyType> : public juce::StrictVariantConverter<MyType> {};

## Member Function Documentation

## ◆ fromVar()

template<typename Type >

static Type StrictVariantConverter< Type >::fromVar | ( | const var & | v | ) |
| static

References jassert.

## ◆ toVar()

template<typename Type >

static var StrictVariantConverter< Type >::toVar | ( | const Type & | t | ) |
| static

References jassert.

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

- juce_JSONSerialisation.h