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

improve JSON writing of special values #2

Open
tomprogers opened this issue Aug 29, 2017 · 1 comment
Open

improve JSON writing of special values #2

tomprogers opened this issue Aug 29, 2017 · 1 comment
Assignees

Comments

@tomprogers
Copy link
Owner

tomprogers commented Aug 29, 2017

Expected outcomes for special values:

value expected when JSON expected when TXT
undefined delete file ""
null write 0-length file ""
false "false" ""
true "true" ""
'' "''" ""

The details of this behavior could be a source of contention among downstream users.

Make sure that the table is right, then impl and write ironclad tests for it. Any change to this table is a breaking change, by definition.

@tomprogers tomprogers added the bug label Aug 29, 2017
@tomprogers tomprogers self-assigned this Aug 29, 2017
@tomprogers
Copy link
Owner Author

Also, provide an option that prevents file-deletion. Perhaps, when set, .write() should throw when value is undefined?

@tomprogers tomprogers added enhancement and removed bug labels Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant