anchor.diff:    o: TJSONObject;
     //s: string;
     tile: TMapTile;
  +
  +  ARowArray: TJSONArray;
   begin
     for row := 0 to AMap.Height - 1 do
     begin
  +    ARowArray := TJSONArray.Create;
       for col := 0 to AMap.Width - 1 do
       begin
  -      //todo: string encoding
  -      //o:= FStreamer.ObjectToJSON(AMap.GetTile(Level,Col,Row));
  -      //gr55Rcb14
  -      tile := AMap.GetTile(Level,Col,Row);
  -      //s := Format('%d %d %d %d %d %d %d', [
  -      //  Integer(tile.TerType), tile.TerSubType,
  -      //  tile.RiverType,tile.RiverDir,
  -      //  tile.RoadType, tile.RoadDir,
  -      //  tile.Flags]);
  -      o := FStreamer.ObjectToJSON(tile);
  -      AJson.Add(o);
  -      //AJson.Add(s);
  +      StreamTile(ARowArray, AMap.GetTile(Level,Col,Row));
       end;
  +    AJson.Add(ARowArray);
     end;
   end;
   
  
positive.code: interface
  
  uses
    Classes, SysUtils, map, map_format, terrain, vcmi_json, vcmi_fpjsonrtti, fpjson, lists_manager;
  
  type
  
  
negative.code:   TEMPLATES_FIELD = 'templates';
    OBJECTS_FIELD = 'objects';
  
    TERRAIN_CODES: array[TTerrainType] of string = ('dt', 'sa', 'gr', 'sn', 'sw', 'ro', 'sb', 'lv', 'wt', 'ro');
    ROAD_CODES: array[TRoadType] of String = ('', 'pd','pg', 'pc');
    RIVER_CODES: array[TRiverType] of string = ('', 'rw', 'ri', 'rm', 'rl');
  
  
  { TMapWriterVCMI }
  
  