JsonWriter.Write C# (CSharp) Method

Write() public method

public Write ( string str ) : void
str string
return void
        public void Write (string str)
        {
            DoValidation (Condition.Value);
            PutNewline ();

            if (str == null)
                Put ("null");
            else
                PutString (str);

            context.ExpectingValue = false;
        }

Same methods

JsonWriter::Write ( bool boolean ) : void
JsonWriter::Write ( decimal number ) : void
JsonWriter::Write ( double number ) : void
JsonWriter::Write ( int number ) : void
JsonWriter::Write ( long number ) : void
JsonWriter::Write ( ulong number ) : void

Usage Example

Example #1
0
 public override string ToString()
 {
     StringBuilder sb = new StringBuilder ();
     JsonWriter writer = new JsonWriter (sb);
     writer.WriteObjectStart ();
     writer.WritePropertyName ("option");
     writer.Write (option);
     writer.WritePropertyName ("subfield");
     writer.Write (subfield);
     writer.WritePropertyName ("tarId");
     writer.Write (tarId);
     writer.WriteObjectEnd ();
     return sb.ToString();
 }
All Usage Examples Of JsonWriter::Write