JSONResult to String

后端 未结 3 493
轮回少年
轮回少年 2020-12-02 15:19

I have a JsonResult that is working fine, and returning JSON from some POCO\'s. I want to save the JSON as a string in a DB.

public JsonRes         


        
3条回答
  •  醉话见心
    2020-12-02 15:39

    json = " { \"success\" : false, \"errors\": { \"text\" : \"绑定登录失败!\" } }";            
    return new MemoryStream(Encoding.UTF8.GetBytes(json));
    

提交回复
热议问题