オブジェクトKeyValuePairをシリアル化できません。たとえば :KeyValuePairがJsonFxシリアル化で動作しない
int[] test = { 0, 1, 2, 3, 4, 5 };
List<KeyValuePair<string, object>> test_d = new List<KeyValuePair<string,object>>();
test_d.Add(new KeyValuePair<string, object>("temp", 12));
test_d.Add(new KeyValuePair<string, object>("temp2", test));
Console.WriteLine(JsonFx.JsonWriter.Serialize(test_d));
戻る[{},{}]
私はこの不幸な状況をどのように修正すればよいですか?結果が与えなかった "タプル"の意味の中で同様のものを使用する。
JsonFXの代わりにNewtonsoft.Jsonを使用できますか? –
JsonFxは、4年以上サポートされていない6歳のプロジェクトです。 M.Wiśnickiのコードを使用し、答えとしてマークします。 –