code: public static function create(
          $mediaType,
          int $options = 0,
          string $urlPrefix = null,
          int $depth = 512
      ): self
      {
          if (!$mediaType instanceof MediaTypeInterface) {
              $mediaType = MediaType::parse(0, $mediaType);
          }
  
          return new self($mediaType, new EncoderOptions($options, $urlPrefix, $depth));
      }
docs: Create an encoding that will encode JSON API content.
  
  @param string|MediaTypeInterface $mediaType
  @param int $options
  @param string|null $urlPrefix
  @param int $depth
  @return Encoding