Open blaubart69 opened 11 years ago
This code ...
using System; using System.Collections.Generic; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var wr = new LitJson.JsonWriter(Console.Out); wr.PrettyPrint = true; wr.WriteArrayStart(); foreach (KeyValuePair<string, int> kv in new List<KeyValuePair<string, int>> { new KeyValuePair<string,int>("bumsti",1), new KeyValuePair<string,int>("mausi",2), new KeyValuePair<string,int>("zandi",3) }) { wr.PrettyPrint = true; wr.WriteObjectStart(); wr.PrettyPrint = false; wr.WritePropertyName(kv.Key); wr.Write(kv.Value); wr.WriteObjectEnd(); } wr.PrettyPrint = true; wr.WriteArrayEnd(); } } }
gives me that output:
[ {"bumsti":1}, {"mausi":2}, {"zandi":3} ]
want to have...
This code ...
gives me that output:
want to have...