code: public function encodeMessageRef(MessageRef $messageRef, Field $field)
      {
          return [
              'M' => [
                  'curie' => [self::TYPE_STRING => $messageRef->getCurie()->toString()],
                  'id'    => [self::TYPE_STRING => $messageRef->getId()],
                  'tag'   => $messageRef->hasTag() ? [self::TYPE_STRING => $messageRef->getTag()] : ['NULL' => true],
              ],
          ];
      }
docs: @param MessageRef $messageRef
  @param Field      $field
  
  @return mixed