From aa96606c61533ebf520c915e7c065c344a9b65f5 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Sun, 22 Aug 2010 11:46:57 -0700 Subject: [PATCH] small enhancement to testing multi value json bodies --- README.markdown | 2 +- src/jsx_test.erl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 68e0ea2..acbee3f 100644 --- a/README.markdown +++ b/README.markdown @@ -58,7 +58,7 @@ jsx is stream based and allows the parsing of naked, unwrapped json values. toge ### notes ### -don't edit the various jsx\_utfx.erl files in the src dir directly, see /priv/jsx\_decoder.erl for why +don't edit the various jsx\_utfx.erl files in the src dir directly, see comments in those files for why jsx supports utf8, utf16 (little and big endian) and utf32 (little and big endian). future support is planned for erlang iolists diff --git a/src/jsx_test.erl b/src/jsx_test.erl index 7896ee0..76e2caf 100644 --- a/src/jsx_test.erl +++ b/src/jsx_test.erl @@ -154,7 +154,7 @@ multi_decode_loop({event, E, Next}, [S|Acc]) -> multi_json_body() -> - <<"0 1 -1 1e1 0.7 0.7e-1 true false null {} [] [1, 2, 3] \"hope this works\"">>. + <<"0 1 -1 1e1 0.7 0.7e-1 truefalsenull {} {\"key\": \"value\"}[] [1, 2, 3]\"hope this works\"">>. multi_test_result() -> [ [{integer, "0"}], @@ -167,6 +167,7 @@ multi_test_result() -> [{literal, false}], [{literal, null}], [start_object, end_object], + [start_object, {key, "key"}, {string, "value"}, end_object], [start_array, end_array], [start_array, {integer, "1"}, {integer, "2"}, {integer, "3"}, end_array], [{string, "hope this works"}]