From: Jake Farrell Date: Mon, 26 Sep 2011 15:29:03 +0000 (+0000) Subject: THRIFT-1357: Erlang dependency breaks build X-Git-Tag: 0.8.0~72 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=7dcd49f1f9034773c9ee890a579d063e6936b6f5;p=common%2Fthrift.git 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 48b49623..aa4aed89 100644 --- a/lib/erl/src/thrift_json_protocol.erl +++ b/lib/erl/src/thrift_json_protocol.erl @@ -294,7 +294,7 @@ write(This0, {string, Str}) -> write_values(This0, [ {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 @@ write_values(This0, ValueList) -> %% 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)