Loading...
Searching...
No Matches
juce::StrictVariantConverter< Type > Struct Template Reference

`#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 juce::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> {};
juce::StrictVariantConverter
Definition juce_JSONSerialisation.h:516
juce::VariantConverter
Definition juce_JSONSerialisation.h:478

Definition at line 515 of file juce_JSONSerialisation.h.

## Member Function Documentation

## fromVar()

template<typename Type>

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

inline static

Definition at line 519 of file juce_JSONSerialisation.h.

## toVar()

template<typename Type>

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

inline static

Definition at line 526 of file juce_JSONSerialisation.h.

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

- juce_JSONSerialisation.h