You are here

public function JSON::encode in Apigee Edge 8

Encodes field data to the target format.

Parameters

array $data: Data to be encoded.

Return value

string Encoded data.

Overrides FieldStorageFormatInterface::encode

File

src/Plugin/ApigeeFieldStorageFormat/JSON.php, line 39

Class

JSON
JSON formatter for Apigee Edge field storage.

Namespace

Drupal\apigee_edge\Plugin\ApigeeFieldStorageFormat

Code

public function encode(array $data) : string {
  return json_encode($data);
}