Wing.Utility 1.0.9

dotnet add package Wing.Utility --version 1.0.9
NuGet\Install-Package Wing.Utility -Version 1.0.9
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Wing.Utility" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Wing.Utility --version 1.0.9
#r "nuget: Wing.Utility, 1.0.9"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Wing.Utility as a Cake Addin
#addin nuget:?package=Wing.Utility&version=1.0.9

// Install Wing.Utility as a Cake Tool
#tool nuget:?package=Wing.Utility&version=1.0.9

1、动态解析json,可解析对象或者数组,提供IsObject,IsArray属性

var json = "{\"a\":1,\"b\":2}";
var obj = DynamicJson.Parse(json);//将json字符串转换为对象

var isObject = obj.IsObject();//json是否是对象
var isArray = obj.IsArray();//json是否是数组
var count = obj.Count();

var isExist = obj.IsDefined("a");//判断是否有a属性
isExist = obj.IsDefined(0);//判断是否有a属性,按索引号
isExist = obj.a();//判断是否有a属性,同IsDefined方法

var v = obj.Get("a");//获取a的值
//v = obj.Get(0);//获取a的值,按索引号
v = obj.a;//获取a的值,同Get方法

obj.Delete("b");//删除b属性
obj.Delete(1);//删除b属性,按索引号

obj.TrySet("c", 9899);//添加属性c

var names = obj.GetDynamicMemberNames();//获取所有动态属性的名称

2、计算字符串表达式的值

var exp = "1+2(2*(3+4))";
var value = CalcOperation.CalcStr(exp);
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.9 135 10/9/2023
1.0.8 334 3/3/2021
1.0.6 302 3/3/2021
1.0.5 339 1/5/2021
1.0.4 322 1/5/2021
1.0.3 378 10/23/2020
1.0.0 393 10/17/2020

Summary of changes made in this release of the package.