FastLED 3.9.15
Loading...
Searching...
No Matches

◆ as_int() [4/4]

template<typename IntType>
fl::optional< IntType > fl::JsonValue::as_int ( ) const
inline

Definition at line 1036 of file json.h.

1038 {
1039 // Check if we have a valid value first
1040 if (data.empty()) {
1041 return fl::nullopt;
1042 }
1043
1044 IntConversionVisitor<IntType> visitor;
1045 data.visit(visitor);
constexpr nullopt_t nullopt
Definition optional.h:11
variant_t data
Definition json.h:678

References data, fl::nullopt, and fl::IntConversionVisitor< IntType >::result.