Skip to content
This repository was archived by the owner on Feb 28, 2020. It is now read-only.

ustcfdm/matlab_jsonc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

matlab_jsonc

MgRemoveJsoncComments: Remove comments in a json string for matlab to decode.
MgReadJsoncFile: Read and decode jsonc file.
MgSaveToJsonFile: Write structure to json file.

  • This code uses c library rapidjson.
  • C++ style comments are supported.
  • Tail comma is supported.

Example

% read json string with comments from a file
jsc = fileread("filename.jsonc");
% remove comments
js = MgRemoveJsoncComments(jsc);
% decode json string with internal function jsondecode
jo = jsondecode(js);

% directly read jsonc file
j = MgReadJsoncFile("filename.jsonc");

% write structure to json file
MgSaveToJsonFile(j, "filename2.jsonc");

About

This repository have been merged into mango_matlab (https://github.com/ustcfdm/mango_matlab)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors