forked from GitTools/GitVersion
-
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.
deterministically serialize number and string JSON output
Ever since the introduction of the JsonOutputFormatter way back in 2014 [1] all fields where serialized as JSON string. Except for values looking like an int which where then serialized as JSON numbers. This had some strange unpredictable side effects like PreReleaseNumber being an empty JSON string instead of null or a "2009069" ShortSha being formatted as a JSON number. This change ensures all fields are serialized as JSON string except Major, Minor, Patch, PreReleaseNumber, WeightedPreReleaseNumber, CommitsSinceVersionSource and UncommittedChanges which are now always serialized as JSON number. Deserialisation remains the same as before for all fields so we continue to accept both JSON string and JSON number formatted values. Fixes GitTools#1688 and fixes GitTools#2304. [1] GitTools@f2daf60#diff-fde1a8ff593c6ac2ad558a6f9bb512e0350db91343b185f9b2a00d1d6e848bc3
- Loading branch information
Showing
7 changed files
with
143 additions
and
14 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
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
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