summaryrefslogtreecommitdiff
path: root/modules/codec-json/c++/json.tmpl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codec-json/c++/json.tmpl.hpp')
-rw-r--r--modules/codec-json/c++/json.tmpl.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp
index f37b440..1cf566e 100644
--- a/modules/codec-json/c++/json.tmpl.hpp
+++ b/modules/codec-json/c++/json.tmpl.hpp
@@ -265,8 +265,8 @@ template<typename T, size_t... D, typename FromEncode>
struct json_encode<schema::FixedArray<T,D...>, FromEncode> {
using Schema = schema::FixedArray<T,D...>;
- static error_or<void> encode_at(const data<Schema, FromEncode>& from, buffer& to, std::array<std::size_t, sizeof...(D)>& index, uint64_t depth, bool pretty){
- auto eov = json_encode<T, FromEncode>::encode(from.at({index}), to, depth, pretty);
+ static error_or<void> encode_at(const data<Schema, FromEncode>& from, buffer& to, data<schema::FixedArray<schema::UInt64,D>, FromEncode>& index, uint64_t depth, bool pretty){
+ auto eov = json_encode<T, FromEncode>::encode(from.at(index), to, depth, pretty);
if(eov.is_error()){
return eov;
}
@@ -274,7 +274,7 @@ struct json_encode<schema::FixedArray<T,D...>, FromEncode> {
}
template<size_t Level, size_t Dim, size_t... DimPack>
- static error_or<void> encode_level(const data<Schema, FromEncode>& from, buffer& to, std::array<std::size_t, sizeof...(D)>& index, uint64_t depth, bool pretty){
+ static error_or<void> encode_level(const data<Schema, FromEncode>& from, buffer& to, data<schema::FixedArray<schema::UInt64,D>, FromEncode>& index, uint64_t depth, bool pretty){
{
auto err = to.push('[');
if(!err.template is_type<err::no_error>()){