forked from mohsen1/yawn-yaml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix number strings being converted to numbers
Fixes mohsen1#78. This also fixes numbers larger than Number.MAX_SAFE_INTEGER represented as strings being rounded when the yaml is loaded and serialized again. Causes a slight regression with the styling of string values. Specifically, any strings that are modified in the JSON are quoted in the resulting yaml, even if they weren't in the original.
- Loading branch information
Showing
3 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Are you sure about this change? Previously, it was
x: abc
, now it will bex: "abc"
. I would think thatreplacePrimitive
might need to test the type ofvalue
.