2020-12-17 V2.0.2012.1701
*.[改进]当以json模式post数据时,自动转码json中的中文。 *.[改进]修复json查看器括号折叠不正确的BUG。
This commit is contained in:
parent
11ee9eb8e2
commit
e9f5ca3c3c
Binary file not shown.
Binary file not shown.
|
@ -52,7 +52,7 @@ namespace JackWangCUMT.WinForm
|
||||||
{
|
{
|
||||||
startLines.Push(i);
|
startLines.Push(i);
|
||||||
}
|
}
|
||||||
if (text_trim.StartsWith("}")) // Look for method endings
|
if (text_trim.StartsWith("}") || text_trim.EndsWith("},")) // Look for method endings
|
||||||
{
|
{
|
||||||
if (startLines.Count > 0)
|
if (startLines.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -60,23 +60,11 @@ namespace JackWangCUMT.WinForm
|
||||||
list.Add(new FoldMarker(document, start, document.GetLineSegment(start).Length, i, 57, FoldType.TypeBody, "...}"));
|
list.Add(new FoldMarker(document, start, document.GetLineSegment(start).Length, i, 57, FoldType.TypeBody, "...}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (text_trim.StartsWith("[")) // Look for method starts
|
if (text_trim.StartsWith("[")|| text_trim.EndsWith("[")) // Look for method starts
|
||||||
{
|
{
|
||||||
startLines.Push(i);
|
startLines.Push(i);
|
||||||
}
|
}
|
||||||
if (text_trim.StartsWith("]")) // Look for method endings
|
if (text_trim.StartsWith("]") || text_trim.EndsWith("],")) // Look for method endings
|
||||||
{
|
|
||||||
if (startLines.Count > 0)
|
|
||||||
{
|
|
||||||
int start = startLines.Pop();
|
|
||||||
list.Add(new FoldMarker(document, start, document.GetLineSegment(start).Length, i, 57, FoldType.TypeBody, "...]"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (text_trim.EndsWith("[")) // Look for method starts
|
|
||||||
{
|
|
||||||
startLines.Push(i);
|
|
||||||
}
|
|
||||||
if (text_trim.StartsWith("]")) // Look for method endings
|
|
||||||
{
|
{
|
||||||
if (startLines.Count > 0)
|
if (startLines.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
// 方法是按如下所示使用“*”: :
|
// 方法是按如下所示使用“*”: :
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.0.2012.1501")]
|
[assembly: AssemblyVersion("2.0.2012.1701")]
|
||||||
[assembly: AssemblyFileVersion("2.0.2012.1501")]
|
[assembly: AssemblyFileVersion("2.0.2012.1701")]
|
|
@ -1,5 +1,7 @@
|
||||||
using DotNet4.Utilities;
|
using DotNet4.Utilities;
|
||||||
using ICSharpCode.TextEditor.Document;
|
using ICSharpCode.TextEditor.Document;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using ryCommon;
|
using ryCommon;
|
||||||
using ryCommonDb;
|
using ryCommonDb;
|
||||||
using System;
|
using System;
|
||||||
|
@ -141,6 +143,18 @@ namespace 开发辅助工具.Tools
|
||||||
{
|
{
|
||||||
str = "post";
|
str = "post";
|
||||||
}
|
}
|
||||||
|
var PostData = this.TxtPost.Text.Trim();
|
||||||
|
if (CbbContentType.Text== "application/json")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(PostData);
|
||||||
|
PostData = Newtonsoft.Json.JsonConvert.SerializeObject(jo, new Newtonsoft.Json.JsonSerializerSettings() { StringEscapeHandling = Newtonsoft.Json.StringEscapeHandling.EscapeNonAscii });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
HttpItem item = new HttpItem
|
HttpItem item = new HttpItem
|
||||||
{
|
{
|
||||||
URL = TxtUrl.Text.Trim(),
|
URL = TxtUrl.Text.Trim(),
|
||||||
|
@ -148,7 +162,7 @@ namespace 开发辅助工具.Tools
|
||||||
IsToLower = this.ChkUrlLower.Checked,
|
IsToLower = this.ChkUrlLower.Checked,
|
||||||
Cookie = this.TxtCookie.Text.Trim(),
|
Cookie = this.TxtCookie.Text.Trim(),
|
||||||
Referer = this.CbbReferer.Text.Trim(),
|
Referer = this.CbbReferer.Text.Trim(),
|
||||||
Postdata = this.TxtPost.Text.Trim(),
|
Postdata = PostData,
|
||||||
Timeout = Convert.ToInt32(this.CbbTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
|
Timeout = Convert.ToInt32(this.CbbTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
|
||||||
ReadWriteTimeout = Convert.ToInt32(this.CbbWriteTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
|
ReadWriteTimeout = Convert.ToInt32(this.CbbWriteTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
|
||||||
UserAgent = this.CbbUserAgent.Text,
|
UserAgent = this.CbbUserAgent.Text,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user