# Backend Plugin Json Fehler - Rückgabe beginnt mit \[ \]

**URL:** <https://forum.shopware.com/t/backend-plugin-json-fehler-ruckgabe-beginnt-mit/15795>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [26. September 2013 um 11:00 UTC](https://forum.shopware.com/t/backend-plugin-json-fehler-ruckgabe-beginnt-mit/15795 "2013-09-26T11:00:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Almare](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Almare](https://forum.shopware.com/u/Almare)\
**Post date:** [26. September 2013 um 11:00 UTC](https://forum.shopware.com/t/backend-plugin-json-fehler-ruckgabe-beginnt-mit/15795/1 "2013-09-26T11:00:56Z")

</div>

Hallo, ich hab mal dieses Tutorial [ExtJS 4 Backend-Modul mit Tree und Grid](http://wiki.shopware.de/ExtJS-4-Backend-Modul-mit-Tree-und-Grid%5C_detail%5C_769.html#Der%5C_Controller%5C_-%5C_main.js) abgearbeitet und auf die 4er Version übertragen. Das funktioniert auch alles soweit, allerdings erhalte ich bei der Json Ausgabe nun folgendes: `[]{"items":[{"text":"Deutsch","id":"3","parentId":"1","cls":"folder"},{"text":"Englisch","id":"4","parentId":"1","cls":"folder"}]}` Wie man sieht steht vor dem Json Code 2 Klammern . Diese sorgen nun dafür das Shopware die Informationen nicht parsen kann. Hat jemand schonmal ein ähnliches Problem gehabt und eine Lösung gefunden?

---

<div class="post-metadata">

**Author:** ![Almare](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Almare](https://forum.shopware.com/u/Almare)\
**Post date:** [26. September 2013 um 11:17 UTC](https://forum.shopware.com/t/backend-plugin-json-fehler-ruckgabe-beginnt-mit/15795/2 "2013-09-26T11:17:08Z")

</div>

Gefahr erkannt, Fehler gebannt! Das Problem lag an der Rückgabe in Shopware 4 wird statt `echo Zend\_Json::encode(array("items" =\> $nodes));` dies benötigt `$this-\>View()-\>assign(array("items" =\> $nodes));`
