diff --git a/src/StringTagField.php b/src/StringTagField.php index edcbe65..948358c 100644 --- a/src/StringTagField.php +++ b/src/StringTagField.php @@ -270,7 +270,7 @@ public function saveInto(DataObjectInterface $record) */ public function suggest(HTTPRequest $request) { - $responseBody = Convert::raw2json( + $responseBody = json_encode( array('items' => array()) ); @@ -285,7 +285,7 @@ public function suggest(HTTPRequest $request) $tags = $this->getTags($term); } - $responseBody = Convert::raw2json( + $responseBody = json_encode( array('items' => $tags) ); } diff --git a/src/TagField.php b/src/TagField.php index 2bbf33f..98d661f 100644 --- a/src/TagField.php +++ b/src/TagField.php @@ -219,7 +219,7 @@ public function Field($properties = array()) } $schema['optionUrl'] = $this->getSuggestURL(); } - $this->setAttribute('data-schema', Convert::array2json($schema)); + $this->setAttribute('data-schema', json_encode($schema)); $this->addExtraClass('ss-tag-field');