[erlang-questions] JSX 2.8.0 Issue

Theepan <>
Mon Aug 1 03:06:48 CEST 2016


Yes - 18.0

On Mon, Aug 1, 2016 at 4:44 AM, Technion <> 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:*  <
> > on behalf of Theepan <
> >
> *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
> ---------
>
> ()18>
> ()18>
> ()18>
> ()18> jsx:encode(#{<<"library">> => <<"jsx">>,
> <<"awesome">> => true}).
> ** exception error: bad argument
>      in function  jsx_parser:value/4 (../src/jsx_parser.erl, line 163)
> ()19>
> ()19>
>
> ()19>
> ()19> jsx:encode(maps:to_list(#{<<"library">> =>
> <<"jsx">>, <<"awesome">> => true})).
> <<"{\"awesome\":true,\"library\":\"jsx\"}">>
> ()20>
> ()20>
> ()20> [Quit]
>
> [ eventcx_server]#
> [ 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
> [ 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/72f7324c/attachment.html>


More information about the erlang-questions mailing list