converting list to json format - quick and easy way

后端 未结 7 1746
梦如初夏
梦如初夏 2020-12-05 09:56

Let\'s say I have an object MyObject that looks like this:

public class MyObject
{
  int ObjectID {get;set;}
  string ObjectString {get;set;}
} 
7条回答
  •  天涯浪人
    2020-12-05 10:05

    You could return the value using return JsonConvert.SerializeObject(objName); And send it to the front end

提交回复
热议问题