diff --git a/lib/OpenLayers/Format/WFSDescribeFeatureType.js b/lib/OpenLayers/Format/WFSDescribeFeatureType.js index b71291e0f8..b0bb1b694a 100644 --- a/lib/OpenLayers/Format/WFSDescribeFeatureType.js +++ b/lib/OpenLayers/Format/WFSDescribeFeatureType.js @@ -6,7 +6,6 @@ /** * @requires OpenLayers/Format/XML.js * @requires OpenLayers/Format/OGCExceptionReport.js - * @requires OpenLayers/Format/JSON.js */ /** @@ -19,14 +18,6 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class( OpenLayers.Format.XML, { - /** - * Property: jsonFormat - * {OpenLayers.Format.JSON} - * Parser instance used to parse JSON for cross browser support. The native - * JSON.parse method will be used where available (all except IE<8). - */ - jsonFormat: null, - /** * Property: regExes * Compiled regular expressions for manipulating strings. @@ -158,10 +149,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class( this.readChildNodes(node, obj.annotation); }, "appinfo": function(node, obj) { - if (!this.jsonFormat) { - this.jsonFormat = new OpenLayers.Format.JSON(); - } - obj.appinfo = this.jsonFormat.read(this.getChildValue(node)); + obj.appinfo = this.getChildValue(node); }, "documentation": function(node, obj) { if (!obj.documentation) { diff --git a/tests/Format/WFSDescribeFeatureType.html b/tests/Format/WFSDescribeFeatureType.html index d1ee22e80a..6e9812a766 100644 --- a/tests/Format/WFSDescribeFeatureType.html +++ b/tests/Format/WFSDescribeFeatureType.html @@ -425,7 +425,7 @@ var format = new OpenLayers.Format.WFSDescribeFeatureType(); var res = format.read(text); var property = res.featureTypes[0].properties[0]; - t.eq(property.annotation.appinfo.title["en"], "Population", "appinfo read correctly"); + t.eq(property.annotation.appinfo, '{"title":{"en":"Population"}}', "appinfo read correctly"); t.eq(property.annotation.documentation["en"], "Number of persons living in the state", "documentation read correctly"); }