Skip to content

Struct Arrays importing as cell array (again) #73

@nickcounts

Description

@nickcounts

Sorry, this looks like a duplicate of #22, but the suggested code that closed that issue does not appear to work. Here is the output using the current release of jsonlab

>> data2json=struct('name','Nexus Prime','rank',9);
data2json(2)=struct('name','Sentinel Prime','rank',9);
data2json(3)=struct('name','Optimus Prime','rank',9)
savejson('',data2json);
json2data=loadjson(ans,'SimplifyCell',1)

data2json = 

1x3 struct array with fields:

    name
    rank


json2data = 

    [1x1 struct]    [1x1 struct]    [1x1 struct]

>>

Any ideas/solutions will be greatly appreciated 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions