20 #ifndef jsonserial_array_hpp
21 #define jsonserial_array_hpp
23 namespace jsonserial {
25 template <
class T,
size_t N>
26 struct is_std_array<std::array<T,N>> : std::true_type {};
29 struct JSonArrayImpl<T, typename std::enable_if<is_std_array<T>::value>::type>
32 JSonArrayImpl(T& array) : array_(array), index_(0) {}
34 void add(JSonSerial& js, JSonClass::Creator* cr, JKString& s)
override {
36 if (index_ >= array_.size()) js.error(JSonError::CantAddToArray);
37 else readArrayValue(js, array_[index_++], objptr, cr, s);