diff --git a/doc/JSON.Decoder.UnexpectedTokenError.html b/doc/JSON.Decoder.UnexpectedTokenError.html
index 645c15e..b4895f5 100644
--- a/doc/JSON.Decoder.UnexpectedTokenError.html
+++ b/doc/JSON.Decoder.UnexpectedTokenError.html
@@ -118,7 +118,7 @@
message(exception)
-
@@ -175,7 +175,7 @@
message(exception)
-
+
View Source
@@ -184,7 +184,7 @@
diff --git a/doc/JSON.Decoder.html b/doc/JSON.Decoder.html
index e4470a4..f0f6650 100644
--- a/doc/JSON.Decoder.html
+++ b/doc/JSON.Decoder.html
@@ -74,7 +74,7 @@
json v1.0.3
JSON.Decoder protocol
-
+
View Source
@@ -155,7 +155,7 @@
t()
-
+
View Source
@@ -197,7 +197,7 @@
decode(bitstring_or_char_list)
-
+
View Source
diff --git a/doc/JSON.Encoder.Error.html b/doc/JSON.Encoder.Error.html
index ff9a69c..025a339 100644
--- a/doc/JSON.Encoder.Error.html
+++ b/doc/JSON.Encoder.Error.html
@@ -82,6 +82,11 @@
+
+ Thrown when an encoder error happens
+
+
+
@@ -113,7 +118,7 @@
message(exception)
-
@@ -147,7 +152,7 @@
exception(args)
-
+
View Source
@@ -170,7 +175,7 @@
message(exception)
-
+
View Source
@@ -179,7 +184,7 @@
diff --git a/doc/JSON.Encoder.Helpers.html b/doc/JSON.Encoder.Helpers.html
index fcba35c..8d1a9cc 100644
--- a/doc/JSON.Encoder.Helpers.html
+++ b/doc/JSON.Encoder.Helpers.html
@@ -74,7 +74,7 @@
json v1.0.3
JSON.Encoder.Helpers
-
+
View Source
@@ -153,7 +153,7 @@
dict_encode(coll)
-
+
View Source
@@ -177,7 +177,7 @@
enum_encode(coll)
-
+
View Source
diff --git a/doc/JSON.Encoder.html b/doc/JSON.Encoder.html
index 6382b78..c457a28 100644
--- a/doc/JSON.Encoder.html
+++ b/doc/JSON.Encoder.html
@@ -74,7 +74,7 @@
json v1.0.3
JSON.Encoder protocol
-
+
View Source
@@ -164,7 +164,7 @@
t()
-
+
View Source
@@ -206,7 +206,7 @@
encode(term)
-
+
View Source
@@ -248,7 +248,7 @@
typeof(term)
-
+
View Source
diff --git a/doc/api-reference.html b/doc/api-reference.html
index b8015d0..e2895f4 100644
--- a/doc/api-reference.html
+++ b/doc/api-reference.html
@@ -232,6 +232,9 @@
+
Thrown when an encoder error happens
+
+
diff --git a/lib/json/decoder.ex b/lib/json/decoder.ex
index c24c4ef..7b9bd69 100644
--- a/lib/json/decoder.ex
+++ b/lib/json/decoder.ex
@@ -3,18 +3,6 @@ defmodule JSON.Decoder.Error do
Thrown when an unknown decoder error happens
"""
defexception [message: "Invalid JSON - unknown error"]
-
- @doc """
- Invalid JSON
- """
- @spec message(__MODULE__.t) :: String.t
- def message(exception)
-
- @doc """
- Invalid JSON
- """
- @spec exception(term) :: __MODULE__.t
- def exception(term)
end
defmodule JSON.Decoder.UnexpectedEndOfBufferError do
@@ -22,18 +10,6 @@ defmodule JSON.Decoder.UnexpectedEndOfBufferError do
Thrown when the json payload is incomplete
"""
defexception [message: "Invalid JSON - unexpected end of buffer"]
-
- @doc """
- Invalid JSON - unexpected end of buffer
- """
- @spec message(__MODULE__.t) :: String.t
- def message(exception)
-
- @doc """
- Invalid JSON - unexpected end of buffer
- """
- @spec exception(term) :: __MODULE__.t
- def exception(term)
end
defmodule JSON.Decoder.UnexpectedTokenError do
@@ -45,14 +21,7 @@ defmodule JSON.Decoder.UnexpectedTokenError do
@doc """
Invalid JSON - Unexpected token
"""
- @spec message(__MODULE__.t) :: String.t
def message(exception), do: "Invalid JSON - unexpected token >>#{exception.token}<<"
-
- @doc """
- Invalid JSON - unexpected token
- """
- @spec exception(term) :: __MODULE__.t
- def exception(term)
end
defprotocol JSON.Decoder do
diff --git a/lib/json/encoder.ex b/lib/json/encoder.ex
index 36516b8..6334960 100644
--- a/lib/json/encoder.ex
+++ b/lib/json/encoder.ex
@@ -4,16 +4,9 @@ defmodule JSON.Encoder.Error do
"""
defexception [error_info: nil]
- @doc """
- Invalid term to Encode
- """
- @spec exception(term) :: __MODULE__.t
- def exception(term)
-
@doc """
Invalid Term
"""
- @spec message(__MODULE__.t) :: String.t
def message(exception) do
error_message = "An error occurred while encoding the JSON object"
if nil != exception.error_info do