The OpenD Programming Language

serializeText

Ion serialization for custom outputt range.

  1. string serializeText(V value, int serdeTarget)
  2. void serializeText(Appender appender, V value, int serdeTarget)
    void
    serializeText
    (
    Appender
    V
    )
    (
    scope ref Appender appender
    ,
    auto scope ref const V value
    ,
    int serdeTarget = SerdeTarget.ion
    )

Examples

import mir.format: stringBuf;
auto buffer = stringBuf;
static struct S { int a; }
serializeText(buffer, S(4));
assert(buffer.data == `{a:4}`);

Meta