This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
SisMaker
/
jiffy
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
62
Wiki
Activity
Browse Source
Allow iolists to be passed directly to decode/1
Fixes
#15
pull/21/head
0.3.0
Paul J. Davis
13 years ago
parent
fa362cf451
commit
061e8f4f70
1 changed files
with
4 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-2
src/jiffy.erl
+ 4
- 2
src/jiffy.erl
View File
@ -7,7 +7,7 @@
-
on_load
(
init
/
0
)
.
decode
(
Data
)
-
>
decode
(
Data
)
when
is_binary
(
Data
)
-
>
case
nif_decode
(
Data
)
of
{
error
,
_
}
=
Error
-
>
throw
(
Error
)
;
@ -15,7 +15,9 @@ decode(Data) ->
finish_decode
(
EJson
)
;
EJson
-
>
EJson
end
.
end
;
decode
(
Data
)
when
is_list
(
Data
)
-
>
decode
(
iolist_to_binary
(
Data
)
)
.
encode
(
Data
)
-
>
Write
Preview
Loading…
Cancel
Save