JsonResult parsing special chars as \u0027 (apostrophe)

后端 未结 3 1878
天命终不由人
天命终不由人 2020-12-18 05:51

I am in the process of converting some of our web \"services\" to MVC3 from WCF Rest.

Our old web services returned JSON from POCO\'s just fine using: [WebGet(

3条回答
  •  青春惊慌失措
    2020-12-18 06:29

    That shouldn't be any problem, as both representations are equivalent:

    var a = {"CategoryId":8,"SomeId":6,"Name":"Richie\u0027s House"};
    alert(a.Name);
    

    alerts Richie's House.

提交回复
热议问题