-- Guillaume ORIOL <[email protected]> wrote (on Wednesday, 21 April 2010, 04:08 PM +0200):As far as I know, dojox.data.JsonRestStore expects to receive data in the form:[ {"prop1":"value1", "prop2":"value2", ...}, {"prop1":"value1", "prop2":"value2", ...}, ... ] On the server side, I fetch data with a paginator (Zend_Paginator_Adapter_DbSelect). This paginator implements a toJson function. But whatever FETCH_MODE is used to get the data, I get a Json representation like this one: { "0": {"prop1":"value1", "prop2":"value2", ...}, "1": {"prop1":"value1", "prop2":"value2", ...}, ... }Is there something obvious I miss or do I have to write my own implementation of the toJson() function?Honestly, I'd consider that a bug -- numeric indices should be returnedas an array, not as an object. Can you file an issue, please? -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
All right Matthew, but even if the Json object has numeric index, I am
not sure it will fit JsonRestStore data format requirements (array of
objetcs instead of object of objects). Don't you think so?
- [fw-general] Zend_Paginator::toJson() incompatible... Guillaume ORIOL
- Re: [fw-general] Zend_Paginator::toJson() inc... Matthew Weier O'Phinney
- Re: [fw-general] Zend_Paginator::toJson()... Go Lists
- Re: [fw-general] Zend_Paginator::toJs... Matthew Weier O'Phinney
- Re: [fw-general] Zend_Paginator::... Guillaume ORIOL
- Re: [fw-general] Zend_Pagina... Matthew Weier O'Phinney
- Re: [fw-general] Zend_Pa... Guillaume ORIOL
- Re: [fw-general] Zend_Pa... Guillaume ORIOL
