Skip to content

Commit 1a883ca

Browse files
committed
fixed STJson.GetValue<T>() error.
1 parent b6fb3cb commit 1a883ca

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Src/STLib.Json/ExtensionMethods/STJsonExtension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public static T GetValue<T>(this STJson json, STJsonPath jsonPath) {
155155
bool bProcessed = true;
156156
var convert = STJsonBuildInConverter.Get(t);
157157
if (convert != null) {
158-
var value = convert.JsonToObject(t, json, ref bProcessed);
158+
var value = convert.JsonToObject(t, j, ref bProcessed);
159159
if (bProcessed) {
160160
return (T)value;
161161
}
@@ -199,7 +199,7 @@ public static bool GetValue<T>(this STJson json, STJsonPath jsonPath, T defaultV
199199
bool bProcessed = true;
200200
var convert = STJsonBuildInConverter.Get(t);
201201
if (convert != null) {
202-
var value = convert.JsonToObject(t, json, ref bProcessed);
202+
var value = convert.JsonToObject(t, j, ref bProcessed);
203203
if (bProcessed) {
204204
result = (T)value;
205205
return true;

Src/STLib.Json/STLib.Json.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net6.0;netstandard2.0;net35;net47;net48</TargetFrameworks>
@@ -9,7 +9,7 @@
99
<RepositoryUrl>https://github.com/DebugST/STJson</RepositoryUrl>
1010
<PackageProjectUrl>https://debugst.github.io/STJson</PackageProjectUrl>
1111
<PackageIcon>STJson.icon.png</PackageIcon>
12-
<PackageTags>json;stlib;debugst;</PackageTags>
12+
<PackageTags>json;jsonpath;stlib;debugst;</PackageTags>
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
1414
<Description>STJson is a Json parsing library based on the MIT open source protocol . The library is purely native implementation does not rely on any library , so it is very light and convenient , and powerful .</Description>
1515
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
@@ -19,6 +19,7 @@ Support JsonPath syntax.
1919
Simple data aggregation processing.</PackageReleaseNotes>
2020
<Copyright>Copyright 2022 DebugST</Copyright>
2121
<PackageLicenseFile>LICENSE</PackageLicenseFile>
22+
<Version>1.0.1</Version>
2223
</PropertyGroup>
2324

2425
<ItemGroup>

0 commit comments

Comments
 (0)