Commit graph

669 commits

Author SHA1 Message Date
alisdair sullivan
c96d83b488 certain astral plane json escape sequences were inadvertently being
replaced with the replacement character
2014-12-07 15:37:34 -08:00
alisdair sullivan
c1d794f7a9 v2.3.0
let's not hype it up too much
2014-12-03 23:16:41 -08:00
alisdair sullivan
eed34483e4 allow control codes in json passed to the decoder
a malicious actor can introduce the same codepoints via \uXXXX
escapes and they are not dangerous in erlang binaries regardless
2014-12-03 23:11:40 -08:00
alisdair sullivan
edee5931a4 perform uescape escaping in the decoder (for json -> whatever
transformation)`
2014-12-03 23:02:02 -08: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
5f5e85914d v2.2 2014-11-24 19:18:10 -08:00
alisdair sullivan
95a87fa0d7 add uescape option for 7 bit clean output of strings 2014-11-24 19:15:51 -08:00
alisdair sullivan
989609b250 add a return_maps option that returns maps instead of proplists 2014-11-24 19:14:30 -08:00
alisdair sullivan
6b333396a3 add maps_support/0 function that reports whether jsx was
compiled with maps support or not
2014-10-28 04:46:10 +00:00
alisdair sullivan
4d549dd8a9 v2.1.1 2014-08-27 05:45:12 -07: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
713810de97 use iolists in place of binaries when building json 2014-08-26 18:26:23 -07:00
alisdair sullivan
53f51c26ed v2.1 2014-08-19 17:53:22 -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
6b43609730 allow a single trailing comma in objects or arrays 2014-08-19 17:47:44 -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
Jihyun Yu
80d883e1d4 Fix dialyzer with maps_support 2014-06-07 15:05:04 +09:00
alisdair sullivan
8845c9acbe bump to v2.0.4 2014-06-03 21:43:43 +00:00
alisdair sullivan
fc28c7cb5f further tweak typespecs 2014-05-20 16:30:21 +00:00
alisdair sullivan
ee989ad534 bump to 2.0.3 2014-05-18 07:16:44 +00:00
alisdair sullivan
2d54e05e74 add incomplete typespecs to is_json and is_term 2014-05-17 20:14:45 +00:00
alisdair sullivan
29d07b242d bump to 2.0.2 and publish to hex.pm 2014-05-06 19:05:06 +00:00
alisdair sullivan
507fa4c41d v2.0.1 2014-04-27 22:48:48 +00:00
alisdair sullivan
698a733ec1 fix formatting of empty lists/objects when converted to json 2014-04-27 22:47:09 +00:00
alisdair sullivan
8e150dafb9 v2.0 2014-04-22 02:00:29 +00:00
alisdair sullivan
649329c362 minor refactoring of feature detection 2014-04-21 23:44:41 +00:00
alisdair sullivan
a46118ecb3 refactor out copy/pasted encode methods 2014-04-18 23:43:40 +00:00
alisdair sullivan
5868430718 tighten `json_term' type
fixes #50
2014-02-10 20:34:20 +00:00
alisdair sullivan
e1599574ff properly export config type 2014-02-10 06:39:15 +00:00
alisdair sullivan
1049d69f3e remove dead code
(thanks to dialyzer for the assist)
2014-02-10 04:06:13 +00:00
alisdair sullivan
a571665cb9 fix unused variable warning during compilation 2014-01-14 01:02:30 +00:00
alisdair sullivan
ff3915abbc Merge branch 'vtwopointoh' into develop 2014-01-14 00:42:12 +00:00
alisdair sullivan
52f5824de4 strip out public api for term/json building functions. not mature yet 2014-01-14 00:33:31 +00:00
alisdair sullivan
c81e2108dd add `get_value/1' function for retrieving the current (final?) value
of the internal representations from `jsx_to_json' and `jsx_to_term'

add all internal representation functions to `jsx' module and export
them
2014-01-12 21:38:02 +00:00
alisdair sullivan
00469ba9c6 change `get_key/1' functions to return bare value or throw error
add `start_term' and `start_json' functions
2014-01-12 20:36:19 +00:00
alisdair sullivan
d011411c23 v1.4.5 2013-12-18 02:32:21 +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
alisdair sullivan
123f8208d0 add atom to values allowed in to be encoded terms 2013-12-12 11:31:38 -08:00
alisdair sullivan
bad524fc70 Merge pull request #44 from flussonic/develop
handle  jsx:encode([{key,value}])
2013-12-12 11:21:20 -08:00
eskuat
71646247f9 Use of list_to_binary/integer_to_list for compat with earlier Erlang versions 2013-12-08 02:36:01 +07:00
eskuat
123965166a Allow integer object keys when converting term to json
i.e. automatic conversion from integer to binary.
2013-12-08 00:18:29 +07:00
Max Lapshin
216b97df55 handle jsx:encode([{key,value}]) 2013-11-28 00:20:59 +04:00
Michael Truog
e31e9c4daa Fix include file issue, when using eunit. 2013-11-25 09:30:04 -08:00
Michael Truog
30b136ce72 Fix dialyzer errors. 2013-11-22 19:22:01 -08:00
alisdair sullivan
5fcd4644bf make sure `jsx_encoder:encode/2' dispatches recursive calls correctly 2013-11-13 02:29:44 +00:00
alisdair sullivan
70aebfc6ad add get_key/1' to jsx_to_json' and `jsx_to_term' 2013-10-31 02:47:45 +00:00