Why microsoft made JavaScriptSerializer obsolete prior to .net 3.5 SP1 and again active after that?

后端 未结 2 1663
盖世英雄少女心
盖世英雄少女心 2020-12-01 16:34

JavaScriptSerializer is not obsolete after .net 3.5 SP1. Should I uses JavaScriptSerializer or the prior recommended DataContractJsonSerializer?. Also why it was made obsole

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 17:01

    I have not seen definitive explanation. There were quite a few people upset when JavaScriptSerializer was made obsolete.

    Scott Gu made this comment on his blog saying that he thought marking it as obsolete didn't make sense.

    The JavaScriptSerializer is currently marked obsolete - although I'm not sure why (was going to ask someone about this today). It is very handy. Note that obsolete doesn't mean removal in .NET 3.5 - it will be supported at least another version or two (or longer if I can convince them ).

    I guess maybe he did convince them :-)

    I have continued to use JavaScriptSerializer as its much more straight forward than the DataContractJsonSerializer.

提交回复
热议问题