From d5c8e8115e6966ed4784d94aaab5cc77b432f564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Thu, 8 Apr 2021 14:50:22 +0200 Subject: [PATCH] Preprocessor update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit — Properly escape some characters in JSON. As a consequence, remove the workaround that was in matlab/loadjson_.m — Fix JSON output for load_params_and_steady_state — Add maximum lead/lag and varobs to JSON output --- matlab/loadjson_.m | 9 ++------- preprocessor | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/matlab/loadjson_.m b/matlab/loadjson_.m index 7daeffd49a..c92bf0f5cc 100644 --- a/matlab/loadjson_.m +++ b/matlab/loadjson_.m @@ -13,7 +13,7 @@ function o = loadjson_(jsonfilename) % available under Octave. Old Matlab versions and Octave use % jsonlab as fallback. -% Copyright (C) 2020 Dynare Team +% Copyright (C) 2020-2021 Dynare Team % % This file is part of Dynare. % @@ -37,10 +37,5 @@ end json = fileread(jsonfilename); -% Remove some escape characters that cannot be interpreted by jsondecode -json = strrep(json, '\w', '\\w'); -json = strrep(json, '\_', '\\_'); -json = strrep(json, '\\\_', '\\_'); - o = jsondecode(json); clear('json'); -o = convertjsondecode(o); \ No newline at end of file +o = convertjsondecode(o); diff --git a/preprocessor b/preprocessor index 29b3b744ef..e3c716faba 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit 29b3b744ef01b30118daa9568fe0e8adaa86ef1b +Subproject commit e3c716faba552bb59146b3b83d6c2fef5e650299 -- GitLab