THRIFT-2884 Map does not serialize correctly for JSON protocol in Go library
Reverted commit 0a378709ab8b3b0de4bafde60a803da24096e8bd
See JIRA for details
diff --git a/lib/php/lib/Thrift/Protocol/TJSONProtocol.php b/lib/php/lib/Thrift/Protocol/TJSONProtocol.php
index dfa07d8..6c93b09 100644
--- a/lib/php/lib/Thrift/Protocol/TJSONProtocol.php
+++ b/lib/php/lib/Thrift/Protocol/TJSONProtocol.php
@@ -215,15 +215,6 @@
         return dechex($val);
     }
 
-    private function json_encode_utf8($str) {
-      $str =  preg_replace_callback("/\\\\u([a-f0-9]{4})/",
-        function ($matches) {
-          return iconv('UCS-4LE','UTF-8', pack('V', hexdec('U' . $matches[1])));
-        },
-        json_encode($str));
-      return preg_replace("|\\\\/|", "/", $str);
-    }
-
     private function writeJSONString($b)
     {
         $this->context_->write();
@@ -232,7 +223,7 @@
             $this->trans_->write(self::QUOTE);
         }
 
-        $this->trans_->write($this->json_encode_utf8($b));
+        $this->trans_->write(json_encode($b));
 
         if (is_numeric($b) && $this->context_->escapeNum()) {
             $this->trans_->write(self::QUOTE);