Source/NFX/Serialization/JSON/JSONWriter.cs
/// <summary>
/// Writes JSON data to the string
/// </summary>
Writes JSON data to the string
Writes JSON data to the string
public static string Write(object data, JSONWritingOptions options = null, IFormatProvider formatProvider = null)
        {
            if (options==null) options = JSONWritingOptions.Compact;
            var sb = new StringBuilder(0xff);
            using( var wri =  formatProvider==null ?
                                  new StringWriter( sb ) :
                                  new StringWriter( sb, formatProvider ) )
            {
                writeAny(wri, data, 0, options);
            }
            return sb.ToString();
        }
public static string Write ( object data , JSONWritingOptions options = null , IFormatProvider formatProvider = null ) { if ( options == null ) options = JSONWritingOptions . Compact ; var sb = new StringBuilder ( 0xff ) ; using ( var wri = formatProvider == null ? new StringWriter ( sb ) : new StringWriter ( sb , formatProvider ) ) { writeAny ( wri , data , 0 , options ) ; } return sb . ToString ( ) ; }
Writes JSON data to the string
Writes JSON data to the string
data
object
options
JSONWritingOptions
formatProvider
IFormatProvider