code: public static function getSubscribingMethods()
      {
          $supported = array();
          foreach (array('json', 'xml') as $format) {
              $supported[] = array(
                  'format' => $format,
                  'type' => 'Webit\Shipment\Vendor\VendorOptionCollection',
                  'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
                  'method' => 'serializeOptionCollection'
              );
  
              $supported[] = array(
                  'format' => $format,
                  'type' => 'Webit\Shipment\Vendor\VendorOptionCollection',
                  'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
                  'method' => 'deserializeVendorOptionCollection'
              );
  
              $supported[] = array(
                  'format' => $format,
                  'type' => 'Webit\Shipment\Vendor\VendorOptionValueCollection',
                  'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
                  'method' => 'serializeOptionValueCollection'
              );
  
              $supported[] = array(
                  'format' => $format,
                  'type' => 'Webit\Shipment\Vendor\VendorOptionValueCollection',
                  'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
                  'method' => 'deserializeVendorOptionValueCollection'
              );
          }
  
          return $supported;
      }
docs: Return format:
  
  array(
  array(
  'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
  'format' => 'json',
  'type' => 'DateTime',
  'method' => 'serializeDateTimeToJson',
  ),
  )
  
  The direction and method keys can be omitted.
  
  @return array