[Proposal]: [建议增加json语法糖] #9254
Unanswered
cqslzhao
asked this question in
Language Ideas
Replies: 1 comment
-
C# 语言不会对json有任何依赖。.NET标准库早已集成 另外,csharplang不接受issue,请使用discussions讨论。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
现在到处都在使用json来传递数据,强烈建议吸取其他语言对json的支持:
1.增加语法糖 json! {}.
例如: var jsonstr=json!{
"aid": this.aid,
"lang": "zh-cn",
"num": "5"
}
2.支持动态 JSON 解析,自动转换为 Dictionary<string, object> 或 dynamic。
3.直接内置 .ToJson() 和 .FromJson() 方法,减少 Newtonsoft.Json 依赖.
现在几乎每个项目都会引用Newtonsoft.Json库,早就应该内置了.
Beta Was this translation helpful? Give feedback.
All reactions