mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-24 17:06:34 +08:00
1. 重新设计了 JSON门户类的实现
2. Script脚本添加了原始字符串的实现 3. 修复了Script中无法对 \" 双引号转义的问题 4. 新增了对于集合嵌套取值的支持(目前仅是集合取值) 5. 重新设计了FlowWorkManagement任务启动的逻辑,修复了触发器无法正常运行的问题 6. 在ScriptBaseFunc中新增了 json() 本地函数,支持将字符串转为IJsonToken进行取值。 7. EmitHelper对于集合取值时,反射获取“get_item”委托时存在看你多个MethodInfo,现在可以传入子项类型,帮助匹配目标重载方法
This commit is contained in:
@@ -95,19 +95,18 @@ namespace Serein.Extend.NewtonsoftJson
|
||||
|
||||
public IJsonToken Parse(string json)
|
||||
{
|
||||
var token = JToken.Parse(json);
|
||||
return new NewtonsoftJsonToken(token);
|
||||
return NewtonsoftJsonTokenFactory.Parse(json);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建一个新的JSON对象。
|
||||
/// 创建一个新的JSON数组对象。
|
||||
/// </summary>
|
||||
/// <param name="values"></param>
|
||||
/// <returns></returns>
|
||||
public IJsonToken CreateObject(IDictionary<string, object>? values = null)
|
||||
{
|
||||
var jobj = values != null ? JObject.FromObject(values) : new JObject();
|
||||
return new NewtonsoftJsonToken(jobj);
|
||||
return new NewtonsoftJsonObjectToken(jobj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -119,7 +118,7 @@ namespace Serein.Extend.NewtonsoftJson
|
||||
public IJsonToken CreateArray(IEnumerable<object>? values = null)
|
||||
{
|
||||
var jarr = values != null ? JArray.FromObject(values) : new JArray();
|
||||
return new NewtonsoftJsonToken(jarr);
|
||||
return new NewtonsoftJsonArrayToken(jarr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -129,8 +128,8 @@ namespace Serein.Extend.NewtonsoftJson
|
||||
/// <returns></returns>
|
||||
public IJsonToken FromObject(object obj)
|
||||
{
|
||||
var token = JToken.FromObject(obj);
|
||||
return new NewtonsoftJsonToken(token);
|
||||
var token = JObject.FromObject(obj);
|
||||
return new NewtonsoftJsonObjectToken(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user