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

WriteObjectEnd() public method

public WriteObjectEnd ( ) : void
return void
        public void WriteObjectEnd ()
        {
            DoValidation (Condition.InObject);
            PutNewline (false);

            ctx_stack.Pop ();
            if (ctx_stack.Count == 1)
                has_reached_end = true;
            else {
                context = ctx_stack.Peek ();
                context.ExpectingValue = false;
            }

            Unindent ();
            Put ("}");
        }

Usage Example

 /// <summary>
 /// Creates a Json string from the Event. Expects Event and Session Timestamps to be in UTC.
 /// </summary>
 public string MarshallToJson()
 {
     using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
     {
         JsonWriter writer = new JsonWriter(stringWriter);
         writer.WriteObjectStart();
         EventMarshaller.Instance.Marshall(this, new Runtime.Internal.Transform.JsonMarshallerContext(null, writer));
         writer.WriteObjectEnd();
         return stringWriter.ToString();
     }
 }
All Usage Examples Of ThirdParty.Json.LitJson.JsonWriter::WriteObjectEnd