THRIFT-1357: Erlang dependency breaks build
Client: erl
Patch: Peter Neumark

Updates json protocol to work with JSX 0.9.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1175906 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/erl/src/thrift_json_protocol.erl b/lib/erl/src/thrift_json_protocol.erl
index 48b4962..aa4aed8 100644
--- a/lib/erl/src/thrift_json_protocol.erl
+++ b/lib/erl/src/thrift_json_protocol.erl
@@ -294,7 +294,7 @@
         {context_pre_item, false},
         case is_binary(Str) of
             true -> Str;
-            false -> jsx:term_to_json(list_to_binary(Str))
+            false -> jsx:term_to_json(list_to_binary(Str), [{strict, false}])
         end,
         {context_post_item, false}
     ]);
@@ -325,7 +325,7 @@
 %% Subsequent calls to read actually operate on the events returned by JSX.
 read_all(#json_protocol{transport = Transport0} = State) ->
     {Transport1, Bin} = read_all_1(Transport0, []),
-    P = jsx:decoder(),
+    P = jsx:parser(),
     State#json_protocol{
         transport = Transport1,
         jsx = P(Bin)