1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    162
    Answers
    7
    Vote Rating
    2
    UbuntuPenguin is on a distinguished road

      0  

    Default Unanswered: Loading association from JSON response.

    Unanswered: Loading association from JSON response.


    Hello Everyone,
    I have service that returns JSON which I then use Ext.create( 'Someap.model.somemodel' ). I've noticed and read that the associated nested JSON however will not be turned into objects. I was wondering what the accepted way of dealing with this conundrum is. Especially in light of the fact that some of my functions may not know that the object was loaded through a store, thereby leading to the associated objects being deserialized and other objects may be loaded through a JSON service leading to the associations being serialized.

    Any help is greatly appreciated.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,007
    Answers
    666
    Vote Rating
    458
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    162
    Answers
    7
    Vote Rating
    2
    UbuntuPenguin is on a distinguished road

      0  

    Default


    I'm a little confused. I already have the data as an array of Objects, but I'm kind of lost as how to take this array found on the model and turn it into a bunch of Models.

    I'm misunderstanding how the example you gave me does that as it loads the data through a proxy which has a url. In my case I have no url, but an array of generic objects instead.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,007
    Answers
    666
    Vote Rating
    458
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Perhaps I misunderstood your requirement. Please be aware that the writer does not support the creation of associated data and you will have to create a custom writer if using this method.

    Scott.

Thread Participants: 1

Tags for this Thread