nl_tokens: Function : parse Takes serialized DataStore information ( most commonly created with <Barefoot . DataStore . Server . toJSON > ) and tries to restore the described datastructure .
pl_tokens: function parse ( serializedStore ) { var self = this , keys = _ . keys ( serializedStore ) ; _ . each ( keys , function ( key ) { var serializedData = serializedStore [ key ] , identifier = serializedData . dataStoreModelIdentifier , Model ; if ( ! _ . has ( self . registeredModelsAndCollections , identifier ) ) { throw new <mask> ( 'Could not deserialize DataStore because ' + 'a required model was not registered before!' ) ; } else { var metaInformation = self . registeredModelsAndCollections [ identifier ] , jsonRepresentation = serializedData . data ; if ( _ . has ( metaInformation , 'collectionClass' ) ) { var Collection = metaInformation . collectionClass , deserializedCollection = new Collection ( ) ; Model = metaInformation . modelClass ; self . set ( key , deserializedCollection ) ; for ( var i in jsonRepresentation ) { var modelJson = jsonRepresentation [ i ] ; deserializedCollection . add ( new Model ( modelJson ) ) ; } } else { Model = metaInformation ; self . set ( key , new Model ( jsonRepresentation ) ) ; } } } ) ; }