public function WSEncoderJSON::encode in Web Service Data 2.0.x
Same name and namespace in other branches
- 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\WSEncoderCode
public function encode(&$data, &$replacements, &$url) {
$data = Json::encode($data);
}