-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Description
I have the following simple json-file that does not remain the same if you read it using loadjson and then store it with savejson (using the master branch and Matlab 2014b).
{
"test1":[
{
"A":0,
"B":1
}
],
"test2":{
"C":2,
"D":3
}
}
The '[]' brackets are removed. I know that arrays with single elements is quite problematic in Matlab, but it looks like you now, compared to older versions, are able to create a cell-array holding a single struct. At least that is what I see printed in the console after loading the example file.
test = loadjson('test.json')
test =
test1 : {[1x1 struct]}
test2 : [1x1 struct]
Would it be possible to use this information when storing the json file to preserve the single element list?
Metadata
Metadata
Assignees
Labels
No labels