How to receive JSON data on WebAPI backend C#?

前端 未结 4 1285
独厮守ぢ
独厮守ぢ 2020-12-08 07:19

How do I receive JSON data on my WebAPI backend in C#?

I have the following JSON sent from my JavaScript frontend.

{
    \"User_Id\": 1,
    \"T         


        
4条回答
  •  庸人自扰
    2020-12-08 07:48

    Try using Newtonsoft.Json package from NuGet. They have functions to serialize and deserialize any string to Json. Also try using dynamic type variables. Helps for deserializing.

提交回复
热议问题