You are here

JsonEncoder.php in JSON:API 8.2

Same filename and directory in other branches
  1. 8 src/Encoder/JsonEncoder.php

File

src/Encoder/JsonEncoder.php
View source
<?php

namespace Drupal\jsonapi\Encoder;

use Drupal\serialization\Encoder\JsonEncoder as SerializationJsonEncoder;

/**
 * Encodes JSON:API data.
 *
 * @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
 *   may change at any time and could break any dependencies on it.
 *
 * @see https://www.drupal.org/project/jsonapi/issues/3032787
 * @see jsonapi.api.php
 */
class JsonEncoder extends SerializationJsonEncoder {

  /**
   * The formats that this Encoder supports.
   *
   * @var string
   */
  protected static $format = [
    'api_json',
  ];

}

Classes

Namesort descending Description
JsonEncoder Encodes JSON:API data.