public Task WriteJsonStructAsync(IJsonStruct value, CancellationToken cancellationToken = default(CancellationToken)) { if (value == null) { return(JsonTextWriter.WriteNullAsync(cancellationToken)); } return(value.WriteAsync(this, cancellationToken)); }
/// <summary> /// Emits supplied value to the writer. /// </summary> /// <param name="value"></param> /// <param name="cancellationToken"></param> public Task WriteJsonStructAsync(IJsonStruct value, CancellationToken cancellationToken = default(CancellationToken)) { if (value == null) { LastWrittenToken = WrittenToken.Null; return(TextWriter.WriteAsync("null")); } return(value.WriteAsync(this, cancellationToken)); }