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