0

I use this example to serialize a dictonary like this

Dictionary<object, object>

What I get is

{ "key": "value" }

what I need is

{ key: "value" }

How do I get this output?

Community
  • 1
  • 1
Sebastian
  • 1,109
  • 4
  • 17
  • 33

1 Answers1

0

wrong approach - now I use a simple stringbuilder.

foreach (DictionaryEntry entry in xSet)
{
  result.AppendFormat("{0}: '{1}',", entry.Key, HttpUtility.JavaScriptStringEncode(entry.Value.ToString()));
}
Sebastian
  • 1,109
  • 4
  • 17
  • 33