diff options
Diffstat (limited to 'modules/codec-json')
-rw-r--r-- | modules/codec-json/c++/json.tmpl.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp index a6d4a20..956393f 100644 --- a/modules/codec-json/c++/json.tmpl.hpp +++ b/modules/codec-json/c++/json.tmpl.hpp @@ -874,7 +874,7 @@ struct json_decode<schema::Tuple<T...>, ToDecode> { } }; -// The whole std::vector approach is hacky af. ToDo change it maybe? +// The whole std::vector approach is hacky af. TODO change it maybe? template<typename T, size_t D, typename ToDecode> struct json_decode<schema::Array<T,D>, ToDecode> { using Schema = schema::Array<T,D>; @@ -979,5 +979,15 @@ struct json_decode<schema::Array<T,D>, ToDecode> { return decode_unflat_level<0>(flat_array, to, index, flat_index); } }; + +template<typename T, uint64_t... Dim, typename ToDecode> +struct json_decode<schema::FixedArray<T,Dim...>, ToDecode> { + using Schema = schema::FixedArray<T,Dim...>; + + static error_or<void> decode(buffer_view& buff, data<Schema, ToDecode>& to){ + + return make_error<err::not_implemented>("Json FixedArray decoding not implemented."); + } +}; } } |