dco_decode_my_value method

  1. @protected
MyValue dco_decode_my_value(
  1. dynamic raw
)
override

Implementation

@protected
MyValue dco_decode_my_value(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  switch (raw[0]) {
    case 0:
      return MyValue_Bool(
        dco_decode_bool(raw[1]),
      );
    case 1:
      return MyValue_String(
        dco_decode_String(raw[1]),
      );
    case 2:
      return MyValue_Array(
        dco_decode_list_my_value(raw[1]),
      );
    default:
      throw Exception("unreachable");
  }
}