Encodes JSON-LD data.
Simply respond to JSON-LD requests using the JSON encoder.
Expanded class hierarchy of JsonldEncoder
class JsonldEncoder extends JsonEncoder implements EncoderInterface {
/**
* The formats that this Encoder supports.
*
* @var array
*/
protected static $format = array(
'jsonld',
'drupal_jsonld',
);
/**
* Check whether the request is for JSON-LD.
*
* @param string $format
* The short name of the format returned by ContentNegotiation.
*
* @return bool
* Returns TRUE if the encoder can handle the request.
*/
public function supportsEncoding($format) {
return in_array($format, static::$format);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JsonEncoder:: |
protected | property | ||
JsonEncoder:: |
protected | property | ||
JsonEncoder:: |
public | function |
Decodes a string into PHP data Overrides DecoderInterface:: |
|
JsonEncoder:: |
public | function |
Encodes data into the given format Overrides EncoderInterface:: |
|
JsonEncoder:: |
constant | |||
JsonEncoder:: |
public | function | Returns the last decoding error (if any) | |
JsonEncoder:: |
public | function | Returns the last encoding error (if any) | |
JsonEncoder:: |
public | function |
Checks whether the serializer can decode from given format Overrides DecoderInterface:: |
|
JsonEncoder:: |
public | function | ||
JsonldEncoder:: |
protected static | property | The formats that this Encoder supports. | |
JsonldEncoder:: |
public | function |
Check whether the request is for JSON-LD. Overrides JsonEncoder:: |