Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struct Arrays importing as cell array (again) #73

Closed
nickcounts opened this issue Mar 21, 2021 · 0 comments
Closed

Struct Arrays importing as cell array (again) #73

nickcounts opened this issue Mar 21, 2021 · 0 comments

Comments

@nickcounts
Copy link

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 👍

@fangq fangq closed this as completed in b1ae5fa Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant