阅读背景:

使用Json.NET将F#可变变量序列化为JSON会生成重复项

来源:互联网 

Here is my code:

这是我的代码:

 open Newtonsoft.Json
 open Newtonsoft.Json.Converters

 type T = {
     mutable name : string;
     mutable height : int;
     }

 let a = { name = "abc"; height = 180;}
 a.height  <- 200
 let b = JsonConvert.SerializeObject(a, Formatting.Indented)
 printfn "%s"  b
 open Newtonsoft.J



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: