C# 将JSON序列化为动态时,属性名称中存在非法字符

C# 将JSON序列化为动态时,属性名称中存在非法字符,c#,dynamic,json.net,C#,Dynamic,Json.net,我正在尝试使用动态类型反序列化某些属性名中包含破折号(-)字符的JSON: string json = MyWebClient.DownloadString("http://api.crossref.org/works/10.1093/brain/75.2.187"); dynamic result = JsonConvert.DeserializeObject<dynamic>(json); string title = result.message.title[0]; strin

我正在尝试使用动态类型反序列化某些属性名中包含破折号(-)字符的JSON:

string json = MyWebClient.DownloadString("http://api.crossref.org/works/10.1093/brain/75.2.187");
dynamic result = JsonConvert.DeserializeObject<dynamic>(json);
string title = result.message.title[0];
string journal = result.message.container-title[0];
string json=MyWebClient.DownloadString(“http://api.crossref.org/works/10.1093/brain/75.2.187");
动态结果=JsonConvert.DeserializeObject(json);
字符串title=result.message.title[0];
string journal=result.message.container title[0];

由于使用了非法字符,我无法获取“容器标题”值。我不想简单地使用
Replace()
删除破折号字符。有什么办法吗?

因为
消息
也是一个
作业对象
你可以像字典一样访问它的属性

result.message["container-title"]