@@ -67,7 +67,7 @@ defprotocol JSON.Encoder do
6767
6868 { io , _prefix } =
6969 Enum . flat_map_reduce ( kv , ?{ , fn { field , value } , prefix ->
70- key = IO . iodata_to_binary ( [ prefix , :elixir_json . encode_binary ( Atom . to_string ( field ) ) , ?: ] )
70+ key = IO . iodata_to_binary ( [ prefix , :json . encode_binary ( Atom . to_string ( field ) ) , ?: ] )
7171 { [ key , quote ( do: encoder . ( unquote ( value ) , encoder ) ) ] , ?, }
7272 end )
7373
@@ -130,25 +130,25 @@ end
130130
131131defimpl JSON.Encoder , for: BitString do
132132 def encode ( value , _encoder ) do
133- :elixir_json . encode_binary ( value )
133+ :json . encode_binary ( value )
134134 end
135135end
136136
137137defimpl JSON.Encoder , for: List do
138138 def encode ( value , encoder ) do
139- :elixir_json . encode_list ( value , encoder )
139+ :json . encode_list ( value , encoder )
140140 end
141141end
142142
143143defimpl JSON.Encoder , for: Integer do
144144 def encode ( value , _encoder ) do
145- :elixir_json . encode_integer ( value )
145+ :json . encode_integer ( value )
146146 end
147147end
148148
149149defimpl JSON.Encoder , for: Float do
150150 def encode ( value , _encoder ) do
151- :elixir_json . encode_float ( value )
151+ :json . encode_float ( value )
152152 end
153153end
154154
@@ -408,7 +408,7 @@ defmodule JSON do
408408 decoders = Keyword . put_new ( decoders , :null , nil )
409409
410410 try do
411- :elixir_json . decode ( binary , acc , Map . new ( decoders ) )
411+ :json . decode ( binary , acc , Map . new ( decoders ) )
412412 catch
413413 :error , :unexpected_end ->
414414 { :error , { :unexpected_end , byte_size ( binary ) } }
@@ -528,16 +528,16 @@ defmodule JSON do
528528 end
529529
530530 def protocol_encode ( value , _encoder ) when is_binary ( value ) ,
531- do: :elixir_json . encode_binary ( value )
531+ do: :json . encode_binary ( value )
532532
533533 def protocol_encode ( value , _encoder ) when is_integer ( value ) ,
534- do: :elixir_json . encode_integer ( value )
534+ do: :json . encode_integer ( value )
535535
536536 def protocol_encode ( value , _encoder ) when is_float ( value ) ,
537- do: :elixir_json . encode_float ( value )
537+ do: :json . encode_float ( value )
538538
539539 def protocol_encode ( value , encoder ) when is_list ( value ) ,
540- do: :elixir_json . encode_list ( value , encoder )
540+ do: :json . encode_list ( value , encoder )
541541
542542 def protocol_encode ( % { } = value , encoder ) when not is_map_key ( value , :__struct__ ) ,
543543 do: JSON.Encoder.Map . encode ( value , encoder )
0 commit comments