code: public static function toJson(Serializer $serializer, \RedKiteCms\Content\Block\BaseBlock $block)
      {
          return $serializer->serialize($block, 'json');
      }
docs: Serializes a block
  
  @param \JMS\Serializer\Serializer $serializer
  @param \RedKiteCms\Content\Block\BaseBlock $block
  
  @return string