/// <summary>
/// 检测传入的json格式是否符合标准
/// </summary>
/// <param name="inobj">传入的json</param>
/// <param name="obj">标准json</param>
/// <param name="fathername"></param>
/// <returns></returns>
public static string ComparePropertiesJ(JObject inobj, JObject obj, string ordertype, string fathername = "")
{
//为空判断
if (inobj == null)
return "数据不可以为空";
//根据开关删减标准json的字段
if (ordertype == td)
{
if (GetSystem_tb("IsNoFabricEnter")) //查询开关
obj.Remove("fabric");
}
else if (ordertype == dh)
{
if (GetSystem_tb("IsNoModelEnter"))//查询开关
obj.Remove("sty
C# 检测传入的json格式是否符合标准,对比json是否一样
最新推荐文章于 2024-06-21 14:32:15 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)