Skip to content

accept string filename in savejson #84

@goretkin

Description

@goretkin

Because of this check:
https://github.com/fangq/jsonlab/blob/089fc82ffab7e03a2e537b48443cdabe22464a8e/savejson.m#L138

>> savejson("", 1, 'test.json')
>> savejson("", 1, "test.json")
Error using varargin2struct
input must be in the form of ...,'name',value,... pairs or structs

Error in savejson (line 141)
   opt=varargin2struct(varargin{:});

https://www.mathworks.com/help/matlab/matlab_prog/update-your-code-to-accept-strings.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions