Skip to content

Commit

Permalink
Update for .NET standard 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Latency McLaughlin committed Feb 18, 2024
1 parent 66ab864 commit 678427b
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 50 deletions.
5 changes: 1 addition & 4 deletions src/JsonEasyNavigation/ArrayEnumeratorWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.Json;
using System.Collections;

namespace JsonEasyNavigation
{
Expand Down
3 changes: 1 addition & 2 deletions src/JsonEasyNavigation/BoxingSafeConverter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Linq.Expressions;
using System.Linq.Expressions;

namespace JsonEasyNavigation
{
Expand Down
14 changes: 9 additions & 5 deletions src/JsonEasyNavigation/JsonEasyNavigation.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.3.0</Version>
<Version>1.3.1</Version>
<PackageIcon>logo.png</PackageIcon>
<Title>JsonEasyNavigation</Title>
<Authors>Sharkadi Andrey</Authors>
<Description>This library provides a wrapper class around JsonElement (located in System.Text.Json) which allows to navigate through JSON DOM (domain object model) hierarchy using indexer-style syntax (as in collections and dictionaries) for properties and array alike. It also contains useful methods to get values without throwing exceptions. </Description>
<Copyright>(c) Sharkadi Andrey</Copyright>
<PackageProjectUrl>https://github.com/sharkadi-a/JsonEasyNavigation</PackageProjectUrl>
<PackageTags>text.json json navigation indexer dictionary list collection DOM</PackageTags>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -25,11 +29,11 @@
</ItemGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="5.0.2" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="System.Text.Json" Version="8.0.2" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
Expand Down
7 changes: 1 addition & 6 deletions src/JsonEasyNavigation/JsonExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;

namespace JsonEasyNavigation
namespace JsonEasyNavigation
{
/// <summary>
/// Various <see cref="JsonDocument"/>, <see cref="JsonElement"/> and <see cref="JsonNavigationElement"/> extensions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;

namespace JsonEasyNavigation
namespace JsonEasyNavigation
{
public readonly partial struct JsonNavigationElement : IReadOnlyDictionary<string, JsonNavigationElement>

Check failure on line 3 in src/JsonEasyNavigation/JsonNavigationElement.ReadOnlyDictionary.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'IReadOnlyDictionary<,>' could not be found (are you missing a using directive or an assembly reference?)
{
Expand Down
6 changes: 1 addition & 5 deletions src/JsonEasyNavigation/JsonNavigationElement.ReadOnlyList.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Collections;

namespace JsonEasyNavigation
{
Expand Down
9 changes: 1 addition & 8 deletions src/JsonEasyNavigation/JsonNavigationElement.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Buffers;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading;

namespace JsonEasyNavigation
namespace JsonEasyNavigation
{
/// <summary>
/// Represents a wrapper around <see cref="JsonElement"/>, which allows to navigate it's
Expand Down
6 changes: 1 addition & 5 deletions src/JsonEasyNavigation/ObjectEnumeratorWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Collections;

namespace JsonEasyNavigation
{
Expand Down
6 changes: 1 addition & 5 deletions src/JsonEasyNavigation/PrimitiveValueExtractor.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.IO;
using System.Text.Json;

namespace JsonEasyNavigation
namespace JsonEasyNavigation
{
internal static class PrimitiveValueExtractor
{
Expand Down
6 changes: 1 addition & 5 deletions src/JsonEasyNavigation/PropertyPathVisitor.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Linq;
using System.Text.Json;

namespace JsonEasyNavigation
namespace JsonEasyNavigation
{
internal static class PropertyPathVisitor
{
Expand Down
1 change: 1 addition & 0 deletions src/JsonEasyNavigation/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using System.Text.Json;

0 comments on commit 678427b

Please sign in to comment.