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

Check for R2017a or older when using jsonencode #464

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

lawrence-mbf
Copy link
Collaborator

Motivation

jsonencode doesn't support the keyword arguments used to convert inf or NaN values to null in json, making conversion loops impossible for these versions.

The fixes now will throw a warning on write.

How to test the behavior?

nwbExport(nwb);

Should be successful on MATLAB R2017b and newer and a warning otherwise.

Checklist

  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XX where XX is the issue number?

jsonencode doesn't support the keyword arguments used to convert inf or NaN values to null in
json, making conversion loops impossible for these versions.

The fixes now will throw a warning on write.
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #464 (69a6498) into master (cd2baec) will decrease coverage by 0.07%.
The diff coverage is 82.14%.

@@            Coverage Diff             @@
##           master     #464      +/-   ##
==========================================
- Coverage   87.61%   87.53%   -0.08%     
==========================================
  Files         127      127              
  Lines        5240     5247       +7     
==========================================
+ Hits         4591     4593       +2     
- Misses        649      654       +5     
Impacted Files Coverage Δ
+schemes/exportJson.m 90.16% <82.14%> (-7.99%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lawrence-mbf lawrence-mbf marked this pull request as ready for review September 8, 2022 16:16
Copy link
Contributor

@bendichter bendichter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@lawrence-mbf lawrence-mbf reopened this Sep 8, 2022
@lawrence-mbf lawrence-mbf merged commit af00d7d into master Sep 8, 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

Successfully merging this pull request may close these issues.

2 participants