chore: fix issues related to remving crestron usings

This commit is contained in:
Andrew Welker
2025-07-04 12:46:08 -05:00
parent dc900f3f31
commit cc7e2ab675
3 changed files with 40 additions and 59 deletions

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -160,11 +159,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 Crestron.SimplSharp.CrestronIO.StringReader(json)))
#endif
using (var reader = new JsonTextReader(new StringReader(json)))
{
var startDepth = reader.Depth;
var obj = JObject.Load(reader);
@@ -181,11 +176,8 @@ 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 Crestron.SimplSharp.CrestronIO.StringReader(json)))
#endif
using (var reader = new JsonTextReader(new StringReader(json)))
{
var startDepth = reader.Depth;
var obj = JArray.Load(reader);