From 9706401c0e1fa33161d1ec8ab20edcdccc977e17 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Tue, 3 Mar 2015 10:44:36 -0800 Subject: [PATCH 1/3] v2.5.1 --- CHANGES.md | 5 +++++ README.md | 4 ++-- src/jsx.app.src | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 066265d..f68c14f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +v2.5.1 + +* assume all datetimes are UTC time and add `Z` designator to indicate +* fix parsing issue with datetimes in arrays + v2.5.0 * `consult/2` function for reading a file directly to a json term diff --git a/README.md b/README.md index fa52a75..312d72d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# jsx (v2.5.0) # +# jsx (v2.5.1) # an erlang application for consuming, producing and manipulating [json][json]. inspired by [yajl][yajl] **jsx** is built via [rebar][rebar] and continuous integration testing provided courtesy [travis-ci][travis] -current status: [![Build Status](https://secure.travis-ci.org/talentdeficit/jsx.png?branch=develop)](http://travis-ci.org/talentdeficit/jsx) +current status: [![Build Status](https://secure.travis-ci.org/talentdeficit/jsx.png?branch=master)](http://travis-ci.org/talentdeficit/jsx) **jsx** is released under the terms of the [MIT][MIT] license diff --git a/src/jsx.app.src b/src/jsx.app.src index 752fab2..2910003 100644 --- a/src/jsx.app.src +++ b/src/jsx.app.src @@ -1,7 +1,7 @@ {application, jsx, [ {description, "a streaming, evented json parsing toolkit"}, - {vsn, "2.5.0"}, + {vsn, "2.5.1"}, {modules, [ jsx, jsx_encoder, From bb422c988fca224965da0bdeb959235df7c67966 Mon Sep 17 00:00:00 2001 From: Bikram Chatterjee Date: Fri, 13 Mar 2015 00:48:33 +0100 Subject: [PATCH 2/3] fixed -0e0 decoding crash with test --- src/jsx_decoder.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jsx_decoder.erl b/src/jsx_decoder.erl index e6b4152..0f03975 100644 --- a/src/jsx_decoder.erl +++ b/src/jsx_decoder.erl @@ -892,6 +892,8 @@ number(Bin, Handler, Acc, [State|Stack], Config) -> zero(<>, N) -> initialdecimal(Rest, N + 1); +zero(<<$e, _/binary>>, N) -> {integer, N}; +zero(<<$E, _/binary>>, N) -> {integer, N}; zero(<<>>, N) -> {zero, N}; zero(_, N) -> {finish_integer, N}. @@ -1171,6 +1173,7 @@ special_number_test_() -> {"0e4", [{float, 0.0}, end_json], <<"0e4">>}, {"1e0", [{float, 1.0}, end_json], <<"1e0">>}, {"-1e0", [{float, -1.0}, end_json], <<"-1e0">>}, + {"-0e0", [{float, -0.0}, end_json], <<"-0e0">>}, {"1e4", [{float, 1.0e4}, end_json], <<"1e4">>}, {"number terminated by whitespace", [start_array, {integer, 1}, end_array, end_json], From 327f0d2875676e17ed1cdff803df62ac85fd648c Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Sun, 15 Mar 2015 12:03:52 -0700 Subject: [PATCH 3/3] v2.5.2 --- CHANGES.md | 4 ++++ README.md | 4 ++-- src/jsx.app.src | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f68c14f..bd06080 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +v2.5.2 + +* fix regression parsing <<"-0e...">> (thanks @c-bik) + v2.5.1 * assume all datetimes are UTC time and add `Z` designator to indicate diff --git a/README.md b/README.md index 312d72d..3445510 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# jsx (v2.5.1) # +# jsx (v2.5.2) # an erlang application for consuming, producing and manipulating [json][json]. inspired by [yajl][yajl] @@ -707,7 +707,7 @@ following events must be handled: ## acknowledgements ## -jsx wouldn't be what it is without the contributions of [paul davis](https://github.com/davisp), [lloyd hilaiel](https://github.com/lloyd), [john engelhart](https://github.com/johnezang), [bob ippolito](https://github.com/etrepum), [fernando benavides](https://github.com/elbrujohalcon), [alex kropivny](https://github.com/amtal), [steve strong](https://github.com/srstrong), [michael truog](https://github.com/okeuday), [devin torres](https://github.com/devinus), [dmitry kolesnikov](https://github.com/fogfish), [emptytea](https://github.com/emptytea), [john daily](https://github.com/macintux), [ola bäckström](https://github.com/olabackstrom), [joseph crowe](https://github.com/JosephCrowe), [patrick gombert](https://github.com/patrickgombert), [eskuat](https://github.com/eskuat) and [max lapshin](https://github.com/maxlapshin) +jsx wouldn't be what it is without the contributions of [paul davis](https://github.com/davisp), [lloyd hilaiel](https://github.com/lloyd), [john engelhart](https://github.com/johnezang), [bob ippolito](https://github.com/etrepum), [fernando benavides](https://github.com/elbrujohalcon), [alex kropivny](https://github.com/amtal), [steve strong](https://github.com/srstrong), [michael truog](https://github.com/okeuday), [devin torres](https://github.com/devinus), [dmitry kolesnikov](https://github.com/fogfish), [emptytea](https://github.com/emptytea), [john daily](https://github.com/macintux), [ola bäckström](https://github.com/olabackstrom), [joseph crowe](https://github.com/JosephCrowe), [patrick gombert](https://github.com/patrickgombert), [eskuat](https://github.com/eskuat), [max lapshin](https://github.com/maxlapshin) and [bikram chatterjee](https://github.com/c-bik) [json]: http://json.org [yajl]: http://lloyd.github.com/yajl diff --git a/src/jsx.app.src b/src/jsx.app.src index 2910003..e623210 100644 --- a/src/jsx.app.src +++ b/src/jsx.app.src @@ -1,7 +1,7 @@ {application, jsx, [ {description, "a streaming, evented json parsing toolkit"}, - {vsn, "2.5.1"}, + {vsn, "2.5.2"}, {modules, [ jsx, jsx_encoder,