Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

序列化时出现 k_BackingField #7

Open
shiweisi opened this issue Sep 3, 2016 · 2 comments
Open

序列化时出现 k_BackingField #7

shiweisi opened this issue Sep 3, 2016 · 2 comments

Comments

@shiweisi
Copy link

shiweisi commented Sep 3, 2016

C#的框架json序列化的时候有点问题,有些环境下运行会出现 k_BackingField,

在对象内添加 DataContract和DataMember属性 可以解决这个问题。

@samurai00
Copy link
Contributor

不要使用 C# 自带的 DataContractJsonSerialize 进行序列化,建议使用 SDK 中带有的 Newtonsoft.Json 内的 JsonConvert.SerializeObject 方法进行序列化。

@shiweisi
Copy link
Author

shiweisi commented Sep 5, 2016

进过测试,现有版本中的 Newtonsoft.Json 为7.0版本。
如果使用7.0版本就会出现上述问题,
换回6.0版本的Newtonsoft.Json 没有出现上述问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants