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:
@@ -126,6 +126,11 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, {
|
||||
}
|
||||
object = walk('', object);
|
||||
}
|
||||
|
||||
if(this.keepData) {
|
||||
this.data = object;
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
} catch(e) {
|
||||
|
||||
Reference in New Issue
Block a user