[erlang-questions] JSX 2.8.0 Issue
Theepan
vasdeveloper@REDACTED
Mon Aug 1 03:12:25 CEST 2016
JSX on CentOS 7 requires EVERY map to be converted into a list.
On Mon, Aug 1, 2016 at 6:36 AM, Theepan <vasdeveloper@REDACTED> wrote:
>
> Yes - 18.0
>
> On Mon, Aug 1, 2016 at 4:44 AM, Technion <technion@REDACTED> wrote:
>
>> Well it's not a "Linux" problem, here it is running fine under Arch
>> Linux. Are you sure you have consistent versions of Erlang?
>>
>>
>> $ uname -a
>> Linux linodeplz 4.4.0-2-ec2 #1 SMP Thu Jan 21 09:52:26 PST 2016 x86_64
>> GNU/Linu
>>
>>
>> Erlang/OTP 19 [erts-8.0] [source] [64-bit] [async-threads:10] [hipe]
>> [kernel-poll:false]
>>
>>
>> 1> jsx:encode(#{<<"library">> => <<"jsx">>, <<"awesome">> => true}).
>> <<"{\"awesome\":true,\"library\":\"jsx\"}">>
>>
>> ------------------------------
>> *From:* erlang-questions-bounces@REDACTED <
>> erlang-questions-bounces@REDACTED> on behalf of Theepan <
>> vasdeveloper@REDACTED>
>> *Sent:* Monday, 1 August 2016 7:10:02 AM
>> *To:* Erlang Questions Mailing List
>> *Subject:* [erlang-questions] JSX 2.8.0 Issue
>>
>> Hi There,
>>
>> I encounter an issue with JSX where --
>>
>>
>> jsx:encode(maps:to_list(#{<<"library">> => <<"jsx">>, <<"awesome">> =>
>> true})). -- works both on both OSX and CentOS.
>>
>> But --
>>
>> jsx:encode(#{<<"library">> => <<"jsx">>, <<"awesome">> => true}). --
>> works on OSX but not on CentOS.
>>
>> I am using the same JSX version on both the machines, and I am using the
>> example from the JSX GitHub page.
>>
>> Please see the logs below:
>>
>>
>> ON CENTOS
>> ---------
>>
>> (eventcx_server@REDACTED)18>
>> (eventcx_server@REDACTED)18>
>> (eventcx_server@REDACTED)18>
>> (eventcx_server@REDACTED)18> jsx:encode(#{<<"library">> => <<"jsx">>,
>> <<"awesome">> => true}).
>> ** exception error: bad argument
>> in function jsx_parser:value/4 (../src/jsx_parser.erl, line 163)
>> (eventcx_server@REDACTED)19>
>> (eventcx_server@REDACTED)19>
>>
>> (eventcx_server@REDACTED)19>
>> (eventcx_server@REDACTED)19> jsx:encode(maps:to_list(#{<<"library">> =>
>> <<"jsx">>, <<"awesome">> => true})).
>> <<"{\"awesome\":true,\"library\":\"jsx\"}">>
>> (eventcx_server@REDACTED)20>
>> (eventcx_server@REDACTED)20>
>> (eventcx_server@REDACTED)20> [Quit]
>>
>> [root@REDACTED eventcx_server]#
>> [root@REDACTED eventcx_server]# uname -a
>> Linux echowave 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015
>> x86_64 x86_64 x86_64 GNU/Linux
>> [root@REDACTED eventcx_server]#
>>
>>
>> ON OSX
>> -------
>>
>> 1>
>> 1>
>> 1> jsx:encode(#{<<"library">> => <<"jsx">>, <<"awesome">> => true}).
>> <<"{\"awesome\":true,\"library\":\"jsx\"}">>
>> 2>
>> 2>
>>
>>
>> 2>
>> 2> jsx:encode(maps:to_list(#{<<"library">> => <<"jsx">>, <<"awesome">> =>
>> true})).
>> <<"{\"awesome\":true,\"library\":\"jsx\"}">>
>> 3>
>> 3>
>> 3> q().
>> ok
>>
>>
>> 4> Piriyatheepans-MacBook-Pro:~ piriyatheepan$
>> Piriyatheepans-MacBook-Pro:~ piriyatheepan$ uname -a
>> Darwin Piriyatheepans-MacBook-Pro.local 15.4.0 Darwin Kernel Version
>> 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64
>> x86_64
>> Piriyatheepans-MacBook-Pro:~ piriyatheepan$
>> Piriyatheepans-MacBook-Pro:~ piriyatheepan$
>>
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160801/80682e8b/attachment.htm>
More information about the erlang-questions
mailing list