I am new in SSIS. I am trying to convert the string into JSON format as shown in the figure. I install the Newtonsoft Json. But it's showing yellow triangle mark.
I have installed all the version of 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 IDE version is Visual Studio 2015 Professional.
After installing the Newtonsoft does not show. When I close the script task popup and again open the script task editor, it showing the yellow exclamation mark, and when I select the Newtonsoft package and check the properties it path & version is showing 0.0.0.0. Then I downloaded the Newtonsoft package and reference the newtonsoft.json.dll file add reference. Then it showing the path and version.
But when I run the package it showing the error.
I have tried by following the article also, but didn't get 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