From 88042c79589f7452bdc2fd23c24f72dec475170d Mon Sep 17 00:00:00 2001 From: arcoRocks <33952704+arcoRocks@users.noreply.github.com> Date: Thu, 15 Feb 2018 14:33:38 +0100 Subject: [PATCH] Fix for #409 --- include/chaiscript/utility/json.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/chaiscript/utility/json.hpp b/include/chaiscript/utility/json.hpp index d7c632c6..c6988d54 100644 --- a/include/chaiscript/utility/json.hpp +++ b/include/chaiscript/utility/json.hpp @@ -392,7 +392,7 @@ class JSON bool skip = true; for( auto &p : *internal.Map ) { if( !skip ) { s += ",\n"; } - s += ( pad + "\"" + p.first + "\" : " + p.second.dump( depth + 1, tab ) ); + s += ( pad + "\"" + json_escape(p.first) + "\" : " + p.second.dump( depth + 1, tab ) ); skip = false; } s += ( "\n" + pad.erase( 0, 2 ) + "}" ) ;