diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-19 16:52:39 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-19 16:52:39 +0200 |
commit | c3dd050ec7d7e775b62b0a8160ec4be4f671f035 (patch) | |
tree | b6f0753e30c0dd82e90e8747143c8cb1cf8ea84a /modules/codec-json | |
parent | e3cdbed1927683f920e14b4fb40bfdc6e2821906 (diff) |
Allow easier conversion and extraction to stl data. Also fixing indent
in json
Diffstat (limited to 'modules/codec-json')
-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 e73e49d..70cc0d1 100644 --- a/modules/codec-json/c++/json.tmpl.hpp +++ b/modules/codec-json/c++/json.tmpl.hpp @@ -18,7 +18,7 @@ struct json_helper { static error_or<void> print_pretty_indent(buffer& to, uint64_t depth){ { - auto eov = to.push(*reinterpret_cast<const uint8_t*>("\r\n"), 2); + auto eov = to.push(*reinterpret_cast<const uint8_t*>("\n")); if(!eov.template is_type<err::no_error>()){ return eov; } @@ -751,7 +751,7 @@ struct json_decode<schema::Struct<schema::Member<T,Lits>...>, ToDecode> { // Check if there are no elements present in the JSON Struct if(buff.read() == '}'){ if(sizeof...(T) > 0){ - return make_error<err::invalid_state>("Expected Struct ending '}'"); + return make_error<err::invalid_state>("Expected non empty struct"); } buff.read_advance(1); return void_t{}; |