vt
25a592de84
accept datetime with msec
2015-08-08 18:15:02 +03:00
alisdair sullivan
84f4b7fb40
assume all datetimes are UTC time and add timezone designator to
...
generated iso8601 strings
2015-03-03 10:43:04 -08:00
alisdair sullivan
8592742ded
rework decoder and encoder slightly to be a little more sane
2014-12-11 06:57:49 +00:00
alisdair sullivan
e5e04db58e
produce binaries in escaped strings in decoder/parser instead of lists
2014-12-09 02:19:13 -08:00
alisdair sullivan
4b3fa9b903
further unrolling of string parsing states and elimination of when
...
guards
2014-12-07 19:12:43 -08:00
alisdair sullivan
8a4f92d8e6
skip redundant check for uescape
escaping
2014-12-07 14:27:39 -08:00
alisdair sullivan
56c3bdb578
reorder parser clauses and simplify escaping for performance
2014-12-07 08:15:56 +00:00
alisdair sullivan
9842a00b4d
strip out checks for repeated keys in generated json. no one cares
...
about repeated keys
2014-12-07 07:59:51 +00:00
alisdair sullivan
dc8e6a0c54
switch string parsing to a count and slice implementation
2014-12-03 22:54:44 -08:00
alisdair sullivan
9528216d15
allow unicode noncharacters and reserved space characters in json
...
strings
fixes #67
2014-12-01 19:43:07 +00:00
alisdair sullivan
95a87fa0d7
add uescape
option for 7 bit clean output of strings
2014-11-24 19:15:51 -08:00
alisdair sullivan
e2ef23a46a
introduce option to skip checking for repeated keys
2014-08-26 22:28:44 -07:00
alisdair sullivan
5d184327e4
fix test that was failing for the wrong reason
2014-08-26 19:27:09 -07:00
alisdair sullivan
78f48db162
parser (and encoder) accept calendar:datetime()
tuples and
...
convert into iso8601 strings
2014-08-19 17:50:07 -07:00
alisdair sullivan
c25bb49902
use end_json
to end streaming when in streaming mode in addition
...
to `end_stream`
2014-08-13 23:00:35 -07:00
alisdair sullivan
4ad9c38cb9
prevent json objects with repeated keys from being emitted from the
...
parser
2014-06-15 22:12:07 +00:00
alisdair sullivan
95b2d9b628
allow atoms in erlang terms to be converted to strings in json objects
...
and arrays. `true`, `false` and `null` excluded
2013-12-18 02:13:50 +00:00
alisdair sullivan
3bb65e9bab
Merge branch 'develop' into vtwopointoh
2013-12-17 02:03:21 +00:00
Michael Truog
30b136ce72
Fix dialyzer errors.
2013-11-22 19:22:01 -08:00
alisdair sullivan
486fda2a74
refactor test suite for additional completeness and clarity
2013-10-20 21:06:51 +00:00
alisdair sullivan
f340e8dc22
refactor options to complete mission: more pragmatism
2013-10-20 03:28:22 +00:00
alisdair sullivan
f137ff484b
fix bad utf8 encodings by default (convert to u+FFFD)
...
this (temporarily, i hope) removes the fast path for handling
strings internally without escaping or replacing bad utf8
2013-10-20 03:16:56 +00:00
alisdair sullivan
e4a401a3a6
incomplete input now results in an error when parsing json or jsx
...
internal form
streaming decoding is now only available when forced with the
`stream` option and no longer returns until forced to via the
token `end_stream`. this api is still subject to being replaced
with an even more explicit streaming mode
2013-10-20 03:10:18 +00:00
alisdair sullivan
6797bf3ed7
rename explicit_end
to stream
in prep for behavior change
2013-10-20 03:10:09 +00:00
alisdair sullivan
d77f23ec9a
merge jsx_strings and jsx_parser
2013-10-20 03:08:40 +00:00
alisdair sullivan
2d385c3342
delegate almost all responsibility of encoder to parser to simplify
...
internals
2013-10-20 03:07:42 +00:00
alisdair sullivan
73b9032c99
remove superfluous parser states
2013-10-19 19:35:02 -07:00
Ola Backstrom
2943116c08
Added typespecs on all exported functions
...
Made sure all exported types do have a typespec is useful in build scenarios
where the erlang compile options
[warnings_as_errors, warn_missing_spec]
are used.
A few type errors found by Dialyzer are corrected too.
modified: src/jsx.erl
modified: src/jsx_config.erl
modified: src/jsx_config.hrl
modified: src/jsx_decoder.erl
modified: src/jsx_parser.erl
modified: src/jsx_to_json.erl
modified: src/jsx_to_term.erl
modified: src/jsx_verify.erl
2013-09-19 17:04:38 +02:00
alisdair sullivan
15e7ec7130
add `{raw, <<"...">>}' handling to parser
...
this is an experimental feature to support the elixir wrapper for
jsx. interface may still change
2013-04-10 21:57:21 -07:00
alisdair sullivan
0441224998
update license dates
2013-03-10 20:30:24 -07:00
alisdair sullivan
89d3cbbd36
rename jsx_utils jsx_config
2013-03-06 01:37:08 -08:00
alisdair sullivan
c4405e45a8
move clean_string to an include file and inline it in parser and encoder, move tests to jsx_test.hrl
2013-03-06 01:28:39 -08:00
alisdair sullivan
dd302eb7b4
extend resume api to parser
2013-03-05 21:10:33 -08:00
alisdair sullivan
a5bf353b21
test incremental parsing for jsx_parser and fix bug with naked values
2013-03-05 17:33:48 -08:00
alisdair sullivan
267977bf6e
replace <<16#ffff/utf8>> with <<239, 191, 191>> to allow certain tests to run on R14x
2013-03-05 16:36:49 -08:00
alisdair sullivan
df04f091f7
change returned config from record to list in error and incomplete handler
2013-03-04 23:48:34 -08:00
alisdair sullivan
2d7b690a91
add incomplete_handler and tests
2013-03-04 23:13:23 -08:00
alisdair sullivan
ca89432e7a
extend error_handler to parser
2013-03-04 22:13:52 -08:00
alisdair sullivan
3a383b6cb0
revert parser to former version
2013-02-24 02:46:11 -08:00
alisdair sullivan
ef566d8cd3
remove cases from clean_string
2013-02-24 02:42:29 -08:00
alisdair sullivan
ceb7ce6586
shiny and new string cleaning for encoder and parser
2013-02-19 22:51:54 -08:00
alisdair sullivan
9e01e3a704
reduce test cases to saner set
2013-02-13 19:13:50 -08:00
alisdair sullivan
ff6a83598b
replace all incidences of opts with config
2013-02-12 11:54:42 -08:00
alisdair sullivan
2f47fdd642
simplify exportation of tests, add strings to test suite
2013-02-11 19:06:44 -08:00
alisdair sullivan
eaf19cde9c
extend tests to decoder, encoder and parser
2013-02-11 18:22:45 -08:00
alisdair sullivan
50133ffefd
remove various tests from encoder and parser
2013-02-05 21:07:38 -08:00
alisdair sullivan
1bf196b9e3
move all encoder escape tests to jsx_utils
2013-02-05 16:52:28 -08:00
alisdair sullivan
c99cbd9d12
move all tests relating to cleaning of binary strings to jsx_utils
2013-02-05 16:40:15 -08:00
alisdair sullivan
b711bc9ef9
factor out clean_string to jsx_utils
2013-02-05 00:03:58 -08:00
alisdair sullivan
6ff94d8e5f
strip trailing whitespace
2012-11-21 23:04:14 -08:00