ThirdParty.Json.LitJson.JsonWriter.Write C# (CSharp) Method

Write() public method

public Write ( System.DateTime date ) : void
date System.DateTime
return void
        public void Write(DateTime date)
        {
            DoValidation(Condition.Value);
            PutNewline();

            
            Put(Amazon.Util.AWSSDKUtils.ConvertToUnixEpochMilliSeconds(date).ToString(CultureInfo.InvariantCulture));

            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 ( string str ) : void
JsonWriter::Write ( uint number ) : void
JsonWriter::Write ( ulong number ) : void

Usage Example

 private void Write(JsonWriter writer, Shape shape)
 {
     if (shape.IsStructure)
         WriteStructure(writer, shape);
     else if (shape.IsList)
         WriteArray(writer, shape);
     else if (shape.IsMap)
         WriteMap(writer, shape);
     else if (shape.IsEnum)
     {
         var enumerationWrapper = this._model.Enumerations.First(x => x.Name == shape.Name);
         writer.Write(enumerationWrapper.EnumerationValues.ElementAt(0).MarshallName);
     }
     else if (shape.IsString)
         writer.Write(shape.Name + "_Value");
     else if (shape.IsInt)
         writer.Write(int.MaxValue);
     else if (shape.IsLong)
         writer.Write(long.MaxValue);
     else if (shape.IsDouble)
         writer.Write(double.MaxValue);
     else if (shape.IsFloat)
         writer.Write(float.MaxValue);
     else if (shape.IsDateTime)
         writer.Write(Constants.DEFAULT_DATE);
     else if (shape.IsBoolean)
         writer.Write(true);
     else if (shape.IsBlob)
         writer.Write(Constants.DEFAULT_BLOB_ENCODED);
     else
         throw new Exception("Unknown Type for shape " + shape.Name);
 }
All Usage Examples Of ThirdParty.Json.LitJson.JsonWriter::Write