sdk/src/Platform/cordova/sqliteSerializer.js
function deserialize (value, columnDefinitions) {

    var deserializedValue = {};
    
    try {
        Validate.notNull(columnDefinitions, 'columnDefinitions');
        Validate.isObject(columnDefinitions);

        Validate.notNull(value);
        Validate.isObject(value);

        for (var property in value) {
            var columnName = storeHelper.getColumnName(columnDefinitions, property); // this helps us deserialize with proper case for the property name
            deserializedValue[columnName] = deserializeMember(value[property], storeHelper.getColumnType(columnDefinitions, property));
        }
        
    } catch (error) {
        throw new verror.VError(error, 'Failed to deserialize value ' + JSON.stringify(value) + '. Column definitions: ' + JSON.stringify(columnDefinitions));
    }

    return deserializedValue;
}
function deserialize (value, columnDefinitions) {

    var deserializedValue = {};
    
    try {
        Validate.notNull(columnDefinitions, 'columnDefinitions');
        Validate.isObject(columnDefinitions);

        Validate.notNull(value);
        Validate.isObject(value);

        for (var property in value) {
            var columnName = storeHelper.getColumnName(columnDefinitions, property); // this helps us deserialize with proper case for the property name
            deserializedValue[columnName] = deserializeMember(value[property], storeHelper.getColumnType(columnDefinitions, property));
        }
        
    } catch (error) {
        throw new verror.VError(error, 'Failed to deserialize value ' + JSON.stringify(value) + '. Column definitions: ' + JSON.stringify(columnDefinitions));
    }

    return deserializedValue;
}
function deserialize ( value , columnDefinitions ) { var deserializedValue = { } ; try { Validate . notNull ( columnDefinitions , 'columnDefinitions' ) ; Validate . isObject ( columnDefinitions ) ; Validate . notNull ( value ) ; Validate . isObject ( value ) ; for ( var property in value ) { var columnName = storeHelper . getColumnName ( columnDefinitions , property ) ; // this helps us deserialize with proper case for the property name deserializedValue [ columnName ] = deserializeMember ( value [ property ] , storeHelper . getColumnType ( columnDefinitions , property ) ) ; } } catch ( error ) { throw new verror . VError ( error , 'Failed to deserialize value ' + JSON . stringify ( value ) + '. Column definitions: ' + JSON . stringify ( columnDefinitions ) ) ; } return deserializedValue ; }
Deserializes a row read from a SQLite table into a Javascript object, as defined by columnDefinitions.
@private
Deserializes a row read from a SQLite table into a Javascript object as defined by columnDefinitions .