StringStructSerializer.serialize

Convenience method to serialize a struct.

If a field name of a struct matches one of the names in the timestamp_fields array and implicitly converts to ulong an ISO formatted string will be emitted in parentheses next to the value of the field (which is assumed to be a unix timestamp).

  1. void serialize(Char[] output, T item, cstring[] timestamp_fields, bool turn_ws_char_to_str)
    class StringStructSerializer(Char)
    void
    serialize
    (
    T
    )
    (
    ref Char[] output
    ,
    ref T item
    ,,
    bool turn_ws_char_to_str = false
    )
  2. void serialize(Char[] output, T item, cstring name)

Parameters

T

type of item

output Char[]

string to serialize struct data to

item T

item to append

timestamp_fields cstring[]

(optional) an array of timestamp field names

turn_ws_char_to_str bool

true if individual whitespace or unprintable character fields should be serialized into a friendlier string representation, e.g. tab character into '\t' (defaults to false)

Meta