You can escape the braces by doubling them up in your format strings:
string.Format("{{ foo: '{0}', bar: '{1}' }}", foo, bar);
You can escape the braces by doubling them up in your format strings:
string.Format("{{ foo: '{0}', bar: '{1}' }}", foo, bar);