提供されたJSON文字列を検討します。これには、従来のC#クラスの作成を妨げるデジタル属性名が含まれています。このJSONを効果的に分析するために、クラスの代わりに辞書を使用できます。
public class Item { public string fajr { get; set; } public string sunrise { get; set; } public string zuhr { get; set; } public string asr { get; set; } public string maghrib { get; set; } public string isha { get; set; } } // 使用字典代替类 var dict = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
以上が無効なC#識別子プロパティ名でJSONを解析する方法は?の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。