I am new in ssisSSIS. iI am trying to convertingconvert the string into jsonJSON format as shown in the figure. iI install the newtonsoft jsonNewtonsoft Json. But it's showing yellow Triangletriangle mark.
I have install allinstalled all the version of newtonsoft Newtonsoft. But still it's showing the error while #
region Namespaces
using Newtonsoft.Json.Linq;
using System;
using System.Windows.Forms;#
endregion
namespace ST_9a0af2e4537b4d26adaef11149343faa {
public partial class ScriptMain: Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase {
public void Main() {
var myJsonString = "{report: {Id: \"aaakkj98898983\"}}";
MessageBox.Show(myJsonString);
try {
// when i add this line to my package then the package is not
excuting.if i remove this line then package is excuting.
JObject.Parse("{report: {\"Id\": \"aaakkj98898983\"}}");
} catch (Exception e) {
MessageBox.Show(e.ToString());
}
Dts.TaskResult = (int) ScriptResults.Success;
}
}
}
the script task. My IdeIDE version is visual studioVisual Studio 2015 professionalProfessional.
afterAfter installing the newtonsoftNewtonsoft does not showingshow. when iWhen I close the script task popup and again open the script task edittoreditor, it showing the yellow exclamation mark, and when iI select the newtonsoftNewtonsoft package and check the properties it path & version is showing 0.0.0.0 . then iThen I downloaded the newtonsoftNewtonsoft package and reference the newtonsoft.json.dll file add reference . thenThen it showing the path and version.
But when iI run the package it showing the error .
iI have tryiedtried by fllowingfollowing the article also, but didn't gotget success.
Convert JSON String to JSON Object c# https://www.c-sharpcorner.com/article/json-serialization-and-deserialization-in-c-sharp/ https://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_Linq_JObject_Parse.htm https://www.nuget.org/packages/System.Json/ How to parse JSON without JSON.NET library? Json does not exist in the namespace System Parse JSON string using C# script in SSIS https://learn.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio https://www.dotnetjalps.com/2014/04/converting-csharp-object-json-string.html Cannot find JavaScriptSerializer in .Net 4.0
https://riptutorial.com/json-net/topic/1861/getting-started-with-json-net http://www.rockprogrammer.com/2017/08/how-to-install-json-.net-in-visual-studio-2015.htmls
Can one help me to solve this problem.?
Thanks
Shiv roy