From 3567c042ea2a05edf6b2abf3acd36b1ea1b029bc Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Fri, 22 Jul 2022 11:21:04 -0400 Subject: [PATCH] Bump newtonsoft.json to 13.0.1 (#2012) --- src/Runner.Common/Runner.Common.csproj | 2 +- src/Runner.Listener/Runner.Listener.csproj | 2 +- src/Sdk/PipelinesWebApi/UnknownEnumJsonConverter.cs | 3 ++- src/Sdk/Sdk.csproj | 2 +- src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj index 84bb6e4c0..bfbdc5f2e 100644 --- a/src/Runner.Common/Runner.Common.csproj +++ b/src/Runner.Common/Runner.Common.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj index 1aa14e386..4298c7530 100644 --- a/src/Runner.Listener/Runner.Listener.csproj +++ b/src/Runner.Listener/Runner.Listener.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Sdk/PipelinesWebApi/UnknownEnumJsonConverter.cs b/src/Sdk/PipelinesWebApi/UnknownEnumJsonConverter.cs index f27ae0ab7..c4073c963 100644 --- a/src/Sdk/PipelinesWebApi/UnknownEnumJsonConverter.cs +++ b/src/Sdk/PipelinesWebApi/UnknownEnumJsonConverter.cs @@ -2,6 +2,7 @@ using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Serialization; namespace GitHub.Actions.Pipelines.WebApi { @@ -9,7 +10,7 @@ namespace GitHub.Actions.Pipelines.WebApi { public UnknownEnumJsonConverter() { - this.CamelCaseText = true; + this.NamingStrategy = new CamelCaseNamingStrategy(); } public override bool CanConvert(Type objectType) diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj index 44f6c7941..2bc69fa83 100644 --- a/src/Sdk/Sdk.csproj +++ b/src/Sdk/Sdk.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs b/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs index d4a711bfc..4abf5b0e0 100644 --- a/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs +++ b/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs @@ -84,7 +84,7 @@ namespace GitHub.Services.WebApi if (!enumsAsNumbers) { // Serialze enums as camelCased string values - this.SerializerSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true }); + this.SerializerSettings.Converters.Add(new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy() }); } if (useMsDateFormat)