Encodes data into the requested format.
mixed $data: Data to encode.
string $format: Format name.
string A string representation of $data in the requested format.
Overrides EncoderInterface::encode
public function encode($data, $format) {
// @see Drupal\serialization_test\SerializationTestNormalizer::normalize().
return 'Normalized by ' . $data['normalized_by'] . ', Encoded by SerializationTestEncoder';
}