diff options
Diffstat (limited to 'modules/codec-json/c++/json.tmpl.hpp')
-rw-r--r-- | modules/codec-json/c++/json.tmpl.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp index 70cc0d1..dd57fc5 100644 --- a/modules/codec-json/c++/json.tmpl.hpp +++ b/modules/codec-json/c++/json.tmpl.hpp @@ -233,7 +233,7 @@ struct json_encode<schema::Array<T,D>, FromEncode> { } { index[Level] = i; - auto eov = encode_level<Level+1>(from, to, index, depth, pretty); + auto eov = encode_level<Level+1>(from, to, index, depth+1u, pretty); if(eov.is_error()){ return eov; } @@ -251,7 +251,7 @@ struct json_encode<schema::Array<T,D>, FromEncode> { static error_or<void> encode(const data<Schema, FromEncode>& from, buffer& to, uint64_t depth, bool pretty) { std::array<std::size_t, D> index; - return encode_level<0>(from, to, index, depth, pretty); + return encode_level<0>(from, to, index, depth+1u, pretty); } }; |