<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>ClipboardFusion RSS: How can  using Newtonsoft.json</title>
<atom:link href="https://www.clipboardfusion.com/Discussions/RSS/?TopicID=5af0c734-8938-4aca-bf7c-3bd93b362ce3" rel="self" type="application/rss+xml" />
<link>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=5af0c734-8938-4aca-bf7c-3bd93b362ce3</link>
<description>ClipboardFusion RSS: How can  using Newtonsoft.json</description>
<lastBuildDate>Thu, 04 Jun 2026 15:23:10 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=5af0c734-8938-4aca-bf7c-3bd93b362ce3</generator>
<item>
<title>RE: How can  using Newtonsoft.json</title>
<link>https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#5</link>
<pubDate>Thu, 06 Jan 2022 01:30:17 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#5</guid>
<category>ClipboardFusion</category>
<description><![CDATA[OK. I get it.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
OK. I get it.
</div>
]]></content:encoded>
<media:thumbnail url="https://www.clipboardfusion.com/Discussions/Download/?ID=d1c6f8d9-2b8d-437d-bca7-d220c9661af1"/>
</item>
<item>
<title>RE: How can  using Newtonsoft.json</title>
<link>https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#4</link>
<pubDate>Thu, 06 Jan 2022 01:16:46 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#4</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Quote:
Can you try installing this: https://www.newtonsoft.com/json
Thanks!
Already installed.
And  copying to the \ClipboardFusion folder will not work.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="BackGrey"><div class="Text"><div><b>Quote:</b></div>Can you try installing this: https://www.newtonsoft.com/json<br/>
Thanks!</div></div><br/>
Already installed.<br/>
And  copying to the \ClipboardFusion folder will not work.
</div>
]]></content:encoded>
<media:thumbnail url="https://www.clipboardfusion.com/Discussions/Download/?ID=d1c6f8d9-2b8d-437d-bca7-d220c9661af1"/>
</item>
<item>
<title>RE: How can  using Newtonsoft.json</title>
<link>https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#3</link>
<pubDate>Wed, 05 Jan 2022 17:09:39 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#3</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Can you try installing this: https://www.newtonsoft.com/json
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Can you try installing this: https://www.newtonsoft.com/json<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
<media:thumbnail url="https://www.clipboardfusion.com/Discussions/Download/?ID=d1c6f8d9-2b8d-437d-bca7-d220c9661af1"/>
</item>
<item>
<title>RE: How can  using Newtonsoft.json</title>
<link>https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#2</link>
<pubDate>Tue, 28 Dec 2021 07:40:46 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3#2</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Code
Copy
Select All
using System;
using System.Text;
using System.Net;
using System.IO;
using System.Security.Cryptography;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;   //install-package newtonsoft.json ,
// The 'text' parameter will contain the text f...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e933b30577547ab5dbde6a826312c" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e933b30577547ab5dbde6a826312cJs'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e933b30577547ab5dbde6a826312cJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Text;
using System.Net;
using System.IO;
using System.Security.Cryptography;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;   //install-package newtonsoft.json ,
// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard when run as a Macro
//   - Ignored by ClipboardFusion if it is 'null'
//   - Passed along to the next action in a Trigger (null changed to an empty string)
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
Baidu AB = new Baidu();
string retString = AB.BaiduTrans(text);
if (!retString.Contains("dst"))
{
BFS.Dialog.ShowTrayMessage("Error:获取翻译失败!");
return text;
}
Root rt = JsonConvert.DeserializeObject&lt;Root&gt;(retString);
for (int i = 0; i &lt; rt.trans_result.Count; i++)
{
return(rt.trans_result[i].dst);
}
}
}
public class Trans_resultItem
{
public string src { get; set; }
public string dst { get; set; }
}
public class Root
{
public string @from { get; set; }
public string to { get; set; }
public List&lt;Trans_resultItem&gt; trans_result { get; set; }
}
public class Baidu
{
public string BaiduTrans(string text)
{
string q = text;
string from = "auto";
string to = "zh";
// your APP ID
string appId = "";
Random rd = new Random();
string salt = rd.Next(100000).ToString();
// your key
string secretKey = "";
string sign = EncryptString(appId + q + salt + secretKey);
string url = "http://api.fanyi.baidu.com/api/trans/vip/translate?";
url += "q=" + WebUtility.HtmlEncode(q);
url += "&from=" + from;
url += "&to=" + to;
url += "&appid=" + appId;
url += "&salt=" + salt;
url += "&sign=" + sign;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "text / html; charset = UTF - 8";
request.UserAgent = null;
request.Timeout = 6000;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream myResponseStream = response.GetResponseStream();
StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
string retString = myStreamReader.ReadToEnd();
myStreamReader.Close();
myResponseStream.Close();
return retString;
}
public string EncryptString(string str)
{
MD5 md5 = MD5.Create();
byte[] byteOld = Encoding.UTF8.GetBytes(str);
byte[] byteNew = md5.ComputeHash(byteOld);
StringBuilder sb = new StringBuilder();
foreach (byte b in byteNew)
{
sb.Append(b.ToString("x2"));
}
return sb.ToString();
}
}</pre><textarea id="code019e933b30577547ab5dbde6a826312c" name="code019e933b30577547ab5dbde6a826312c" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
<media:thumbnail url="https://www.clipboardfusion.com/Discussions/Download/?ID=d1c6f8d9-2b8d-437d-bca7-d220c9661af1"/>
</item>
<item>
<title>How can  using Newtonsoft.json</title>
<link>https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3</link>
<pubDate>Tue, 28 Dec 2021 07:34:38 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/how-can-using-newtonsoftjson/?ID=5af0c734-8938-4aca-bf7c-3bd93b362ce3</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I need using Newtonsoft.json deserialize a json.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I need using Newtonsoft.json deserialize a json.
</div>
]]></content:encoded>
<media:thumbnail url="https://www.clipboardfusion.com/Discussions/Download/?ID=d1c6f8d9-2b8d-437d-bca7-d220c9661af1"/>
</item>
</channel>
</rss>