Fixed loadjson_ routine (when relying on jsondecode).

Fixed issues with escape characters and updated the preprocessor.
time-shift
Stéphane Adjemian (Odysseus) 2020-01-29 15:54:54 +01:00
parent e39c3bad5b
commit 9590175a9a
2 changed files with 7 additions and 1 deletions

View File

@ -36,5 +36,11 @@ if isoctave() || matlab_ver_less_than('9.1')
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);

@ -1 +1 @@
Subproject commit 985d74238170a06509c7239ba1df48b0d645ff6f
Subproject commit 88830aa0e64e2161eb7cfceb294e487b6935a76c