php-rest-service
php-rest-service copied to clipboard
JSON output: please add right encoding
I encountered a problem with the json output: accented vowels and apostrophes were parsed as "\u00e0" or "\u2019".
I solved simply by adding the native php json_encode() suffix JSON_FORCE_OBJECT|JSON_UNESCAPED_UNICODE in
https://github.com/marcj/php-rest-service/blob/3263cd29881574077ec8f7f849713f4a59e4a37f/RestService/Client.php#L251
like this:
if (!is_string($json)) $json = json_encode($json, JSON_FORCE_OBJECT|JSON_UNESCAPED_UNICODE);
Please integrate it in your code ;)
Please provide a pull-request, so I can merge.