From c3dd050ec7d7e775b62b0a8160ec4be4f671f035 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Mon, 19 Aug 2024 16:52:39 +0200 Subject: Allow easier conversion and extraction to stl data. Also fixing indent in json --- modules/codec-json/c++/json.tmpl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/codec-json') 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 print_pretty_indent(buffer& to, uint64_t depth){ { - auto eov = to.push(*reinterpret_cast("\r\n"), 2); + auto eov = to.push(*reinterpret_cast("\n")); if(!eov.template is_type()){ return eov; } @@ -751,7 +751,7 @@ struct json_decode...>, ToDecode> { // Check if there are no elements present in the JSON Struct if(buff.read() == '}'){ if(sizeof...(T) > 0){ - return make_error("Expected Struct ending '}'"); + return make_error("Expected non empty struct"); } buff.read_advance(1); return void_t{}; -- cgit v1.2.3