Permalink
Browse files

Rename mochi* files - not to collide withing global namespace

  • Loading branch information...
1 parent d9074fa commit 85901e584c3c220f157ec30a7348c619430c0569 @majek majek committed Feb 1, 2012
@@ -37,7 +37,7 @@
%% </li>
%% </ul>
--module(mochijson2).
+-module(mochijson2_fork).
-author('bob@mochimedia.com').
-export([encoder/1, encode/1]).
-export([decoder/1, decode/1, decode/2]).
@@ -140,7 +140,7 @@ json_encode(null, _State) ->
json_encode(I, _State) when is_integer(I) ->
integer_to_list(I);
json_encode(F, _State) when is_float(F) ->
- mochinum:digits(F);
+ mochinum_fork:digits(F);
json_encode(S, State) when is_binary(S); is_atom(S) ->
json_encode_string(S, State);
json_encode([{K, _}|_] = Props, State) when (K =/= struct andalso
@@ -9,7 +9,7 @@
%% in Proceedings of the SIGPLAN '96 Conference on Programming Language
%% Design and Implementation.
--module(mochinum).
+-module(mochinum_fork).
-author("Bob Ippolito <bob@mochimedia.com>").
-export([digits/1, frexp/1, int_pow/2, int_ceil/1]).
View
@@ -6,11 +6,11 @@
-spec encode(any()) -> iodata().
encode(Thing) ->
- mochijson2:encode(Thing).
+ mochijson2_fork:encode(Thing).
-spec decode(iodata()) -> {ok, any()} | {error, any()}.
decode(Encoded) ->
- try mochijson2:decode(Encoded) of
+ try mochijson2_fork:decode(Encoded) of
V -> {ok, V}
catch
E -> {error, E}

0 comments on commit 85901e5

Please sign in to comment.