JsonEncoder.php
Same filename in this branch
Same filename in other branches
- 8.9.x core/modules/jsonapi/src/Encoder/JsonEncoder.php
- 8.9.x core/modules/serialization/src/Encoder/JsonEncoder.php
- 8.9.x core/modules/hal/src/Encoder/JsonEncoder.php
- 10 core/modules/jsonapi/src/Encoder/JsonEncoder.php
- 10 core/modules/serialization/src/Encoder/JsonEncoder.php
- 11.x core/modules/jsonapi/src/Encoder/JsonEncoder.php
- 11.x core/modules/serialization/src/Encoder/JsonEncoder.php
Namespace
Drupal\hal\EncoderFile
-
core/
modules/ hal/ src/ Encoder/ JsonEncoder.php
View source
<?php
namespace Drupal\hal\Encoder;
use Drupal\serialization\Encoder\JsonEncoder as SerializationJsonEncoder;
/**
* Encodes HAL data in JSON.
*
* Simply respond to hal_json format requests using the JSON encoder.
*/
class JsonEncoder extends SerializationJsonEncoder {
/**
* The formats that this Encoder supports.
*
* @var string
*/
protected static $format = [
'hal_json',
];
}
Classes
Title | Deprecated | Summary |
---|---|---|
JsonEncoder | Encodes HAL data in JSON. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.