Addressing nullability warnings in SimpleJson

This commit is contained in:
Kevin Bost
2024-12-26 23:37:54 -08:00
committed by Caelan
parent d8b54ce032
commit 5510f17b94
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,5 @@
#if NETFRAMEWORK || NETSTANDARD2_0
#nullable enable
using System.Net.Http;
using System.Text;

View File

@@ -2,11 +2,14 @@
using Newtonsoft.Json.Converters;
using NuGet.Versioning;
//NB: This is explicitly enabled because this file is linked into multiple projects
#nullable enable
namespace Velopack.Core;
public class SimpleJson
{
private static readonly JsonSerializerSettings Options = new JsonSerializerSettings {
private static readonly JsonSerializerSettings Options = new() {
Converters = { new StringEnumConverter(), new SemanticVersionConverter() },
NullValueHandling = NullValueHandling.Ignore,
};