class JsonEncoder
Same name in this branch
- 9 core/modules/jsonapi/src/Encoder/JsonEncoder.php \Drupal\jsonapi\Encoder\JsonEncoder
- 9 core/modules/serialization/src/Encoder/JsonEncoder.php \Drupal\serialization\Encoder\JsonEncoder
Same name in other branches
- 8.9.x core/modules/jsonapi/src/Encoder/JsonEncoder.php \Drupal\jsonapi\Encoder\JsonEncoder
- 8.9.x core/modules/serialization/src/Encoder/JsonEncoder.php \Drupal\serialization\Encoder\JsonEncoder
- 8.9.x core/modules/hal/src/Encoder/JsonEncoder.php \Drupal\hal\Encoder\JsonEncoder
- 10 core/modules/jsonapi/src/Encoder/JsonEncoder.php \Drupal\jsonapi\Encoder\JsonEncoder
- 10 core/modules/serialization/src/Encoder/JsonEncoder.php \Drupal\serialization\Encoder\JsonEncoder
- 11.x core/modules/jsonapi/src/Encoder/JsonEncoder.php \Drupal\jsonapi\Encoder\JsonEncoder
- 11.x core/modules/serialization/src/Encoder/JsonEncoder.php \Drupal\serialization\Encoder\JsonEncoder
Encodes HAL data in JSON.
Simply respond to hal_json format requests using the JSON encoder.
Hierarchy
- class \Drupal\serialization\Encoder\JsonEncoder extends \Symfony\Component\Serializer\Encoder\JsonEncoder
- class \Drupal\hal\Encoder\JsonEncoder extends \Drupal\serialization\Encoder\JsonEncoder
Expanded class hierarchy of JsonEncoder
1 file declares its use of JsonEncoder
- UserHalLoginHttpTest.php in core/
modules/ hal/ tests/ src/ Functional/ user/ UserHalLoginHttpTest.php
1 string reference to 'JsonEncoder'
- hal.services.yml in core/
modules/ hal/ hal.services.yml - core/modules/hal/hal.services.yml
1 service uses JsonEncoder
- serializer.encoder.hal in core/
modules/ hal/ hal.services.yml - Drupal\hal\Encoder\JsonEncoder
File
-
core/
modules/ hal/ src/ Encoder/ JsonEncoder.php, line 12
Namespace
Drupal\hal\EncoderView source
class JsonEncoder extends SerializationJsonEncoder {
/**
* The formats that this Encoder supports.
*
* @var string
*/
protected static $format = [
'hal_json',
];
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
JsonEncoder::$format | protected static | property | The formats that this Encoder supports. | Overrides JsonEncoder::$format |
JsonEncoder::supportsDecoding | public | function | ||
JsonEncoder::supportsEncoding | public | function | ||
JsonEncoder::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.