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

accept string filename in savejson #84

Closed
goretkin opened this issue Nov 20, 2022 · 0 comments
Closed

accept string filename in savejson #84

goretkin opened this issue Nov 20, 2022 · 0 comments

Comments

@goretkin
Copy link

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

@fangq fangq closed this as completed in 9687d17 Nov 20, 2022
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