You are here

public function WSEncoderJSON::encode in Web Service Data 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/WSEncoder/WSEncoderJSON.php \Drupal\wsdata\Plugin\WSEncoder\WSEncoderJSON::encode()

Encode JSON.

Overrides WSEncoderBase::encode

File

src/Plugin/WSEncoder/WSEncoderJSON.php, line 21

Class

WSEncoderJSON
String Encoder.

Namespace

Drupal\wsdata\Plugin\WSEncoder

Code

public function encode(&$data, &$replacements, &$url) {
  $data = Json::encode($data);
}