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

deterministically serialize number and string JSON output #2527

Merged
merged 1 commit into from
Feb 5, 2021

Commits on Feb 3, 2021

  1. 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
    dieterv committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    d1baac1 View commit details
    Browse the repository at this point in the history