Skip to content

Brakets missing on singelton cells #8

@hesstobi

Description

@hesstobi

I have a related Issue to #1.
I want to convert a cell array of strings to json and transfer it to an external api which expect an array. If the cell is not singelton everything works fine. But if i have a singelton cell it is convertet to string data
e.g:

 >> savejson({'A'})
 ans =
 {
      "root": "A"
 } 

But the external API expecting

 ans =
 {
      "root": [
    "A"
]
 } 

There is the option 'NoRowBracket' for numeric arrays and I think a second option for cell arrays will be needed, e.g. 'NoSingeltonCellBracket'. The default value should be 0, because if you use a cell array in matlab is more likely that you realy want a array.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions