public string SerializeToString(T value) { if (value == null) { return(null); } if (value is string) { return(value as string); } var sb = new StringBuilder(); using (var writer = new StringWriter(sb)) { JsvWriter <T> .WriteObject(writer, value); } return(sb.ToString()); }
public void SerializeToWriter(T value, TextWriter writer) { JsvWriter <T> .WriteObject(writer, value); }