Specifies the DataSource schema. A schema defines the type of the underlying data, the fields from the data objects, their types and functions to extract the data array and total item count from the underlying raw data.

var dataSource = new shield.DataSource({
    schema: {
        type: "json", //default
        data: "result.items",
        total: "result.totalItems",
        fields: {
            id: { path: "productId", type: Number },
            name: { path: "productName", type: String },
            category: { path: "", type: String },
            available: { path: "productAvailable", type: Boolean },
            price: { path: "unitPrice", type: Number  },
            added: { path: "dateAdded", type: Date }