How to parse Json.NET polymorphic objects?

前端 未结 2 717
伪装坚强ぢ
伪装坚强ぢ 2021-01-21 06:30

I\'ve written a web service that sends and returns json created with Json.NET. I\'ve included typenames, which allows polymorphism. With a bit of hacking, I\'ve got this worki

2条回答
  •  情歌与酒
    2021-01-21 07:03

    Try https://github.com/douglascrockford/JSON-js/blob/master/json2.js. There is a parse function which will parse your string into a javascript object safely.

提交回复
热议问题