V
V
Vlad2017-01-11 13:08:32
JSON
Vlad, 2017-01-11 13:08:32

How to achieve correct KeyValuePair serialization with JsonFX?

There is a test code like this

IList list;
      list = new List<KeyValuePair<string, object>>();

      list.Add(new KeyValuePair<string, object>("A", 1));
      list.Add(new KeyValuePair<string, object>("B", new KeyValuePair<string, object>("TEST0", 12345)));
      list.Add(new KeyValuePair<string, object>("C", new KeyValuePair<string, object>("TEST1", new TEST0_CLASS() { prop = 15 })));

After serializing the list object via JsonFx.JsonWriter.Serialize I get [{},{},{}]. How to properly serialize objects of type KeyValuePair ? I didn't find it on google.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question