Index: trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java	(revision 14217)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java	(revision 14219)
@@ -53,4 +53,15 @@
      */
     private static DataSet parse(String osm) throws Exception {
+        return parse(osm, "");
+    }
+
+    /**
+     * Parse JSON.
+     * @param osm OSM data in JSON format, without header/footer
+     * @param extraContent extra content added after OSM elements
+     * @return data set
+     * @throws Exception if any error occurs
+     */
+    private static DataSet parse(String osm, String extraContent) throws Exception {
         try (InputStream in = new ByteArrayInputStream((
                 "{\n" +
@@ -65,4 +76,5 @@
                 "  },\n" +
                 "  \"elements\": [" + osm + "]\n" +
+                extraContent +
                 "}")
                 .getBytes(StandardCharsets.UTF_8))) {
@@ -225,3 +237,14 @@
         assertEquals("route", r.get("type"));
     }
+
+    /**
+     * Test reading remark from Overpass API.
+     * @throws Exception if any error occurs
+     */
+    @Test
+    public void testRemark() throws Exception {
+        DataSet ds = parse("", "," +
+                "  \"remark\": \"runtime error: Query ran out of memory in \\\"query\\\" at line 5.\"\n");
+        assertEquals("runtime error: Query ran out of memory in \"query\" at line 5.", ds.getRemark());
+    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 14217)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 14219)
@@ -115,10 +115,11 @@
      * Test valid data.
      * @param osm OSM data without XML prefix
-     * @throws Exception if any error occurs
-     */
-    private static void testValidData(String osm) throws Exception {
+     * @return parsed data set
+     * @throws Exception if any error occurs
+     */
+    private static DataSet testValidData(String osm) throws Exception {
         try (InputStream in = new ByteArrayInputStream(
                 ("<?xml version='1.0' encoding='UTF-8'?>" + osm).getBytes(StandardCharsets.UTF_8))) {
-            OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE);
+            return OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE);
         }
     }
@@ -341,3 +342,18 @@
         }
     }
+
+    /**
+     * Test reading remark from Overpass API.
+     * @throws Exception if any error occurs
+     */
+    @Test
+    public void testRemark() throws Exception {
+        DataSet ds = testValidData(
+                "<osm version=\"0.6\" generator=\"Overpass API 0.7.55.4 3079d8ea\">\r\n" +
+                "<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>\r\n" +
+                "<meta osm_base=\"2018-08-30T12:46:02Z\" areas=\"2018-08-30T12:40:02Z\"/>\r\n" +
+                "<remark>runtime error: Query ran out of memory in \"query\" at line 5.</remark>\r\n" +
+                "</osm>");
+        assertEquals("runtime error: Query ran out of memory in \"query\" at line 5.", ds.getRemark());
+    }
 }
