/// <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();
}
}