anchor.diff:              false
       end.
   
  -json_encode_string_unicode([], Acc) ->
  +json_encode_string_unicode([], _State, Acc) ->
       lists:reverse([$\" | Acc]);
  -json_encode_string_unicode([C | Cs], Acc) ->
  +json_encode_string_unicode([C | Cs], State, Acc) ->
       Acc1 = case C of
                  ?Q ->
                      [?Q, $\\ | Acc];
  
positive.code: 
  %% @spec encoder([encoder_option()]) -> function()
  %% @doc Create an encoder/1 with the given options.
  encoder(Options) ->
      State = parse_encoder_options(Options, #encoder{}),
      fun (O) -> json_encode(O, State) end.
  
negative.code:      {[-123, <<"foo">>, obj_from_list([{<<"bar">>, []}]), null],
        "[-123,\"foo\",{\"bar\":[]},null]"}
      ].
  
  %% test utf8 encoding
  test_encoder_utf8() ->
      %% safe conversion case (default)
      [34,"\\u0001","\\u0442","\\u0435","\\u0441","\\u0442",34] = 
          encode(<<1,"\321\202\320\265\321\201\321\202">>),
  
      %% raw utf8 output (optional)
      Enc = mochijson2:encoder([{utf8, true}]),
      [34,"\\u0001",[209,130],[208,181],[209,129],[209,130],34] =
          Enc(<<1,"\321\202\320\265\321\201\321\202">>).
  