You are here

public function WSEncoderJSON::encode in Web Service Data 2.0.x

Same name and namespace in other branches
  1. 8 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);
}