fix: update .gitignore to exclude macOS system files and simplify JSON parsing code

This commit is contained in:
jtalborough
2025-02-26 12:55:34 -05:00
parent ae47edcab6
commit 4143e1664c
2 changed files with 1 additions and 8 deletions

1
.gitignore vendored
View File

@@ -397,3 +397,4 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
*.projectinfo
.DS*

View File

@@ -160,11 +160,7 @@ namespace PepperDash.Core.JsonToSimpl
/// <returns></returns>
public static JObject ParseObject(string json)
{
#if NET6_0
using (var reader = new JsonTextReader(new System.IO.StringReader(json)))
#else
using (var reader = new JsonTextReader(new System.IO.StringReader(json)))
#endif
{
var startDepth = reader.Depth;
var obj = JObject.Load(reader);
@@ -181,11 +177,7 @@ namespace PepperDash.Core.JsonToSimpl
/// <returns></returns>
public static JArray ParseArray(string json)
{
#if NET6_0
using (var reader = new JsonTextReader(new System.IO.StringReader(json)))
#else
using (var reader = new JsonTextReader(new System.IO.StringReader(json)))
#endif
{
var startDepth = reader.Depth;
var obj = JArray.Load(reader);