facebook-csharp-sdk / simple-json

JSON library for .NET 2.0+/SL4+/WP7/WindowsStore with optional support for dynamic and DataContract
MIT License
382 stars 143 forks source link

Serialize in a friendly format #79

Open ygoe opened 6 years ago

ygoe commented 6 years ago

Serialization always seems to produce a single line of JSON content. While this may de desirable for network transfers towards machines, it's not useful for writing JSON files that should be readable by humans. Is it possible to format the serialized string with multiple lines, like for example XmlWriterSettings allows it for XML?

Instead of this

{"key":["value1","value2"]}

I'd like to see this

{
  "key": [
    "value1",
    "value2"
  ]
}