Skip to content

One column table cannot be unserialised after serialisation #66

@aardwolf-ge

Description

@aardwolf-ge

This code recreates the problem
v=[ 1; 2 ]
tab= array2table(v)
str=savejson('',tab)
jv=loadjson(str)

producing the error 'The VariableNames property must contain one name for each variable in the table.'

the json object created by savejson is (in compact form)
'{"_TableCols_":["v"],"_TableRows_":[],"_TableRecords_":[[1,2]]}'

when changed to:

'{"_TableCols_":["v"],"_TableRows_":[],"_TableRecords_":[[1],[2]]}'

it works properly, so the problem seems to be on the save side.

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