2011-10-30 13 views

risposta

67

Impostare lo scrittore JSON Formatting proprietà Formatting.Indented:

jsonWriter.Formatting = Formatting.Indented; 

Le JsonConvert.Serialize* metodi hanno anche sovraccarichi che prendono un Formatting enum (grazie John planarità).

Documentazione: Serialize an Object

+9

I vari metodi 'JsonConvert.Serialize *' prendono anche 'Formatting' come secondo argomento. –

Problemi correlati