MATLAB Answers

Converting .mat to .json

161 views (last 30 days)
N. Hosseini
N. Hosseini on 4 Mar 2019
Edited: cui on 26 Aug 2021
Hithanks
I have a .mat file which is used for annotating dataset. I want to convert it into .json file.
I'm not familiar to MATLAB an even doesn't have MATLAB installed.
my question is how to do that in MATLAB or python?

Answers (2)

Walter Roberson
Walter Roberson on 4 Mar 2019
You can load() the .mat file, and pull out the variable you need, and use jsonencode()
  2 Comments
shubham Kumar
shubham Kumar on 10 Jul 2019
how can we save the .json file after creating the .json format?

Sign in to comment.


cui
cui on 26 Aug 2021
Edited: cui on 26 Aug 2021
Import images and COCO annotation json file to Matlab, refer to cocoAPI-matlab

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by