mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-01-11 19:44:44 +00:00
fix: update .gitignore to exclude macOS system files and simplify JSON parsing code
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -397,3 +397,4 @@ FodyWeavers.xsd
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
*.projectinfo
|
||||
.DS*
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user