anchor.diff:  	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}
  -	]),
  +	BattleMapNeg1 = boss_record:new(rpgb_battlemap, []),
  +	BattleMap = BattleMapNeg1,
  +	BattleMap:from_json(Body),
   	case boss_db:find(rpgb_battlemap, [{name, equals, Name},{owner_id,equals,Userid}]) of
   		[] ->
   			{ok, BattleMap0} = BattleMap:save(),
  
positive.code: 	to_html(ReqData, {battle, BattleMap, Session});
  
  to_html(ReqData, {battle, BattleMap, Session} = Ctx) ->
  	Json = encode_map(BattleMap),
  	Templatevars = [
  		{"session", rpgb_session:to_dict(Session)},
  		{"json", mochijson2:encode(Json)},
  
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) ->
  