class JsonEncoder in Drupal 10
Same name in this branch
- 10 core/modules/jsonapi/src/Encoder/JsonEncoder.php \Drupal\jsonapi\Encoder\JsonEncoder
- 10 core/modules/serialization/src/Encoder/JsonEncoder.php \Drupal\serialization\Encoder\JsonEncoder
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/Encoder/JsonEncoder.php \Drupal\jsonapi\Encoder\JsonEncoder
- 9 core/modules/jsonapi/src/Encoder/JsonEncoder.php \Drupal\jsonapi\Encoder\JsonEncoder
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.
Hierarchy
- class \Drupal\serialization\Encoder\JsonEncoder extends \Symfony\Component\Serializer\Encoder\JsonEncoder
- class \Drupal\jsonapi\Encoder\JsonEncoder
Expanded class hierarchy of JsonEncoder
See also
https://www.drupal.org/project/drupal/issues/3032787
1 string reference to 'JsonEncoder'
- jsonapi.services.yml in core/
modules/ jsonapi/ jsonapi.services.yml - core/modules/jsonapi/jsonapi.services.yml
1 service uses JsonEncoder
- serializer.encoder.jsonapi in core/
modules/ jsonapi/ jsonapi.services.yml - Drupal\jsonapi\Encoder\JsonEncoder
File
- core/
modules/ jsonapi/ src/ Encoder/ JsonEncoder.php, line 16
Namespace
Drupal\jsonapi\EncoderView source
class JsonEncoder extends SerializationJsonEncoder {
/**
* The formats that this Encoder supports.
*
* @var string
*/
protected static $format = [
'api_json',
];
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JsonEncoder:: |
protected static | property |
The formats that this Encoder supports. Overrides JsonEncoder:: |
|
JsonEncoder:: |
public | function | ||
JsonEncoder:: |
public | function | ||
JsonEncoder:: |
public | function |