anchor.diff:       {[-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">>).
  
positive.code: parse_encoder_options([], State) ->
      State;
  parse_encoder_options([{handler, Handler} | Rest], State) ->
      parse_encoder_options(Rest, State#encoder{handler=Handler}).
  
  parse_decoder_options([], State) ->
      State;
  
negative.code:             false
      end.
  
  json_encode_string_unicode([], _State, Acc) ->
      lists:reverse([$\" | Acc]);
  json_encode_string_unicode([C | Cs], State, Acc) ->
      Acc1 = case C of
                 ?Q ->
                     [?Q, $\\ | Acc];
  