anchor.diff:      %%
       %% If it sounds backwards, well, it is! :)
   
  -    parse_array([], {Chars, [placeholder | Cache]}, Cache, Kv).
  +    parse_array([], {Chars, put_obj(placeholder, Cache)},
  +		Cache, Kv).
   
   parse_array(Elems, C, OrigCache, Kv) ->
       get_token(C,
  
positive.code: 	     {{array, [null]}, "anh"},
  	     {{array, [null, null]}, "au2h"},
  	     {{array, [3, 4, null, null, null, 5, null]}, "ai3i4u3i5nh"},
  	     {{struct, [{foo, "bar"}, {baz, "boing"}]}, "os3:foos3:bars3:bazs5:boingg"},
  	     {{exception, "bad"}, "xs3:bad"},
  	     {{array, ["foo", "bar", "foo"]}, "as3:foos3:barr1h"},
  	     {{struct, [{foo, 34}, {bar, "foo"}]}, "os3:fooi34s3:barr1g"}
  	    ],
      {Passed, Failed} =
  	lists:foldl(
  	  fun({Term, Str}, Agg) ->
  		  Encoded = lists:flatten(encode(Term)),
  		  {ok, Decoded} = decode_string(Str),
  		  Check = fun(Val1, Val2, {P, F}) ->
  				  case Val1 == Val2 of
  				      true -> {P + 1, F};
  				      _ -> {P, F + 1}
  				  end
  			  end,
  		  Agg1 = Check(Str, Encoded, Agg),
  		  Agg2 = Check(Term, Decoded, Agg1),
  		  io:format("~s == ~s\n~w\n~w == ~w\n~w\n\n", [Str, Encoded, Str == Encoded,
  							       Term, Decoded, Term == Decoded]),
  		  Agg2
  	  end,
  	  {0, 0}, Tests),
      io:format("passed: ~w, failed: ~w\n", [Passed, Failed]).
  
negative.code: 
  parse_object(C, Kv, Obj) ->
      get_token(C,
  	      fun(T, {Chars, Cache}) ->
  		      case T of
  			  obj_end ->
  			      NewCache =
  				  put_obj(Obj, Cache),
  			      ?L(NewCache),
  			      Kv(Obj, {Chars, NewCache});
  			  _ ->
  			      NewCache =
  				  put_obj(placeholder, Cache),
  			      ?L(NewCache),
  			      parse_object_field(
  				Obj, T,
  				{Chars, NewCache}, Cache, Kv)
  		      end
  	      end).
  
  put_obj(_xObj, undefined) ->
      undefined;
  put_obj(Obj, {ObjCache, StrCache}) ->
      {[Obj | ObjCache], StrCache}.
  
  put_str(_Str, undefined) ->
      undefined;
  put_str(Str, {ObjCache, StrCache}) ->
      {ObjCache, dict:store(dict:size(StrCache), Str, StrCache)}.
  
  parse_object_field(_Obj, eof, C, _OrigCache, _Kv) ->
      {done, {error, premature_eof}, C};
  
  %% if the key is a reference, we deference it and continue
  parse_object_field(Obj, RefType, C, OrigCache, Kv)
    when RefType == ref; RefType == str_ref ->
      parse_ref(C,
  	      fun(Key, C1) ->
  		      parse_object_val(Obj, Key, C1, OrigCache, Kv)
  	      end,
  	     RefType == str_ref);
  
  %% if the key is a string, we put it in the cache and continue
  parse_object_field(Obj, Field, {Chars, Cache}, OrigCache, Kv)
    when is_list(Field) ->
      NewCache = put_str(Field, Cache),
      parse_object_val(Obj, Field, {Chars, NewCache}, OrigCache, Kv).
  
  parse_object_val(Obj, Field, {Chars, Cache}, OrigCache, Kv)
    when is_list(Field) ->
  