【发布时间】:2015-03-12 16:20:46
【问题描述】:
我有一个 JSON 字符串来自一个包含多个 JSON 对象的文件,我需要将其反序列化为一个合并的 C# 对象。
File1.json
{
"manage_employees_section_title":
{
"value": "Manage employees",
"description": "The mange employees section title"
}
}
{
"manage_operations_section_title":
{
"value": "Manage operations",
"description": "The mange operations section title"
}
}
即使文件中有多个 JSON 对象,我真的很想从反序列化(或其他方式)返回一个合并的 C# 对象,就像它来自这样的字符串:
{
"manage_employees_section_title":
{
"value": "Manage employees",
"description": "The mange employees section title"
},
"manage_operations_section_title":
{
"value": "Manage operations",
"description": "The mange operations section title"
}
}
JSON.NET 或任何其他工具可以做到这一点吗?
非常感谢各位..
【问题讨论】:
-
@dav_i 我只是在想同样的事情,非常感谢。
标签: c# .net json json.net json-deserialization