Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #13 from puzza007/jiffy-decode-fix

fix json decode errors with jiffy
  • Loading branch information...
commit 68457c31d0672169bbe02c3b0377072f2cd16bb4 2 parents f0fab10 + 4c38312
@majek majek authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/sockjs_util.erl
View
6 src/sockjs_util.erl
@@ -36,4 +36,8 @@ eep0018(JSON, decode) -> json:decode(JSON).
jiffy(Thing, encode) ->
iolist_to_binary(jiffy:encode(Thing));
jiffy(JSON, decode) ->
- {ok, jiffy:decode(JSON)}.
+ try jiffy:decode(JSON) of
+ V -> {ok, V}
+ catch
+ E -> E
+ end.
Please sign in to comment.
Something went wrong with that request. Please try again.