Adding a keepData option to formats. If true, formats will be given a reference to the parsed data (named data) after a read. Use this when you need to access part of the structure that was not extracted in creating features (for example). Note that for versioned parsers, the data property is available on format.parser.data. Thanks for the patch sky. r=me (closes #1753)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8924 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-03-01 16:37:07 +00:00
parent c7afe8e134
commit fecda8f089
5 changed files with 51 additions and 0 deletions

View File

@@ -126,6 +126,11 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, {
}
object = walk('', object);
}
if(this.keepData) {
this.data = object;
}
return object;
}
} catch(e) {