Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix json decode errors with jiffy #13

Merged
merged 1 commit into from

3 participants

@puzza007

No description provided.

@majek majek merged commit 68457c3 into from
@squaremo
Collaborator

Arp, that's late night coding ... thanks Paul!

@puzza007 puzza007 deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 28, 2011
  1. @puzza007
This page is out of date. Refresh to see the latest.
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.
Something went wrong with that request. Please try again.