Hi there
I have a SSIS script task that pulls JSON data from an API, and one issue is that the data returned is in the format:
/Date(1451689200000+0100)/
So how do i get a normal data instead ?
this is what i write to the Output0Buffer
Output0Buffer.Date = metric.Date;
And this is the "convert" part
//Set jsonString using a stream reader
using(StreamReaderreader = newStreamReader(responseStream))
{
jsonString = reader.ReadToEnd().Replace(
"\\","");
reader.Close();
}
//Deserialize our JSON
JavaScriptSerializersr =newJavaScriptSerializer();
//JSON string comes in with a leading and trailing " that need to be removed for parsing to work correctly
//The JSON here is serialized weird, normally you would not need this trim
jsonResponse = sr.Deserialize<
Wage[]>(jsonString.Trim('"'));