L'adattatore REST Ember.js aspetta il JSON da restituire come:Ember.js REST adattatore senza radice JSON
{
"person": {
"first_name": "Barack",
"last_name": "Obama",
"is_person_of_the_year": true
}
}
Ma il mio API restituisce i dati senza un elemento radice:
{
"first_name": "Barack",
"last_name": "Obama",
"is_person_of_the_year": true
}
È possibile personalizzare l'adattatore REST in modo che accetti i miei dati JSON? In questo momento sta mostrando "Asserzione fallita: Il server ha restituito un hash con il tasto 0, ma non si ha la mappatura per esso"
UPDATE: in base alla risposta del Sherwin Yu sotto, questo è ciò che mi si avvicinò con , sembra funzionare finora: https://gist.github.com/richardkall/5910875
risposta Nizza. Grazie! –
Fantastico! Grazie mille! Questo sembra funzionare: https://gist.github.com/richardkall/5910875 – Richard