Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
jsonがDictionaryにシリアライズ可能であることを確認するC#の方法はありますか? 考えられる解決策の 1 つは、try catch を使用することです。
JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
何か良い方法はありますか?
おそらく、検証にはJSON スキーマを使用できます。ここにデモページがあります(リンクはこの記事からのものです)。XML スキーマと同じ原則。