DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
    • can-component
    • can-compute
    • can-connect
      • behaviors
        • ./base/
        • ./cache-requests/
        • ./can/map/
        • ./can/ref/
        • ./constructor/callbacks-once/
        • ./constructor/
        • ./constructor/store/
        • ./data/callbacks/
        • ./data/callbacks-cache/
        • ./data/combine-requests/
        • ./data/localstorage-cache/
        • ./data/memory-cache/
        • ./data/parse/
        • ./data/url/
        • ./data/worker/
        • ./fall-through-cache/
        • ./real-time/
      • modules
        • ./can/base-map/
        • ./can/model/
        • ./can/super-map/
        • ./can/tag/
        • ./helpers/weak-reference-map
      • data types
        • DataInterface
        • Instance
        • InstanceInterface
        • List
        • ListData
    • can-define
    • can-define/list/list
    • can-define/map/map
    • can-route
    • can-route-pushstate
    • can-set
    • can-stache
    • can-stache/helpers/route
    • can-stache-bindings
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Core
  • /
  • can-connect
  • /
  • ListData
  • / On this page
    • ListData

      typedef

      The data format used to create typed lists.

      • source

      Object

      A plain JavaScript object used to hydrate a typed list. This is the data format resolved by getListData.

      A ListData object should look like:

      {
        data: [
          {id: 1, name: "take out the trash"},
          {id: 1, name: "do the dishes"}
        ]
      }
      

      The object must have a data property that is an Array of instance data used to hydrate typed instances.

      The ListData object can have other meta information related to the data that has been loaded. For example, count might be the total number of items the server has:

      {
        data: [
          {id: 1, name: "take out the trash"},
          {id: 1, name: "do the dishes"}
        ],
        count: 1000
      }
      

      The can-connect/data/parse/parse behavior can be used to convert request responses to the ListData format.

      Options

      • data {Array<Object>}:

        The ListData object must have a data property that is an array of objects. Each object is used to hydrate typed instances.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.