Closed Danack closed 11 years ago
Just noticed that this:
static function fromJSON($jsonString){ $data = json_decode($jsonString);
if(array_key_exists('ObjectType', $data) == TRUE){ //Could do sanity check on type here. unset($data['ObjectType']); } return self::factory($data); }
Is being converted to:
JSONFactory.fromJSON = function (jsonString){ var data = json_decode(jsonString);
if(array_key_exists('ObjectType', data) == true){ //Could do sanity check on type here. (data['ObjectType']); } return JSONFactory.factory(this.data); }
i.e. the unset is disappearing - which is weird.
Fixed for small values of fixed. unset is a php language construct so added support for converting it to javascript delete.
Just noticed that this:
static function fromJSON($jsonString){ $data = json_decode($jsonString);
Is being converted to:
JSONFactory.fromJSON = function (jsonString){ var data = json_decode(jsonString);
i.e. the unset is disappearing - which is weird.