Answer the question
In order to leave comments, you need to log in
Asp.net core How to extract data from third party json?
Good afternoon everyone.
I had to modify the old C# project a little, asp.net core. Unable to retrieve data from third party query request. Tried a lot of ways
using System;
using Newtonsoft.Json;
using System.Reflection;
using System.Web.Script.Serialization;
using System.IO;
var reader = new StreamReader(Request.InputStream);
string json = reader.ReadToEnd();
var dict = JsonConvert.DeserializeObject(json);
using (StreamWriter sw = System.IO.File.CreateText(logPath))
{
sw.WriteLine(dict.GetType().GetProperties().ToString()); // System.Reflection.PropertyInfo[]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question