Update: Support for the JSON data format after GSoC 2020

The Google Summer of Code (GSoC) 2020 is over and I had the pleasure to mentor Abdallah Elshamy, who enriched Octave with the jsondecode() and jsonencode() functions. A remaining issue was the translation of the Octave function matlab.lang.makeValidName to the C++ language. This is now accomplished and the overall results are great.

This is a companion discussion topic for the original entry at https://siko1056.github.io/blog/2020/11/23/gsoc2020-json-benchmark.html
1 Like

The figures look much better now :partying_face: :partying_face:

Thanks for taking the time to implement matlab.lang.makeValidName in C++. The performance now is definitely sufficient for our users :100:.

1 Like

@Abdallah_Elshamy Finally TMW found your feature useful :wink:

R2021a release notes > Data Import and Export > jsonencode : Add indentation to JSON text

Use the jsonencode 'PrettyPrint' option to display JSON text with an indentation of two spaces.


Our current implementation for Octave 7 is

jsonencode (..., "PrettyWriter", TF)

and our indention is 4 spaces. Can we change this? :sweat_smile:

Would you like to prepare a small cset to stay compatible :slightly_smiling_face:

1 Like

I am glad that they found it useful :grinning:

Yes, we can. RapidJSON’s PrettyWriter provides a function to change the default indentation.

Certainly, I just finished my exams today and I have time to prepare it.

Done :white_check_mark:
I added the cset in this bug report.

If there is any comment, please let me know

1 Like