anchor.diff:  	to_html(ReqData, {battle, BattleMap, Session});
   
   to_html(ReqData, {battle, BattleMap, Session} = Ctx) ->
  -	Json = encode_map(BattleMap),
  +	Json = rpgb_json:to_json(BattleMap),
   	Templatevars = [
   		{"session", rpgb_session:to_dict(Session)},
   		{"json", mochijson2:encode(Json)},
  
positive.code: 	Body = wrq:req_body(ReqData),
  	{struct, Props} = mochijson2:decode(Body),
  	Name = proplists:get_value(<<"name">>, Props),
  	BattleMap = boss_record:new(rpgb_battlemap, [
  		{name, Name},
  		{json, Body},
  		{owner_id, Userid}
  	]),
  	case boss_db:find(rpgb_battlemap, [{name, equals, Name},{owner_id,equals,Userid}]) of
  		[] ->
  			{ok, BattleMap0} = BattleMap:save(),
  
negative.code: 	to_json(ReqData, {battle, BattleMap, Session});
  
  to_json(ReqData, {battle, BattleMap, Session} = Ctx) ->
  	Json = rpgb_json:to_json(BattleMap),
  	{mochijson2:encode(Json), ReqData, Ctx}.
  
  encode_map(BattleMap) ->
  