[TYPO3-mvc] be module ajax - json encode model

Stephen Bungert stephenbungert at yahoo.de
Sun Sep 30 18:53:04 CEST 2012


I have a be module that gets table records. At the moment I can get a record 
by findByUid, and if I do something like:

$ajaxObj->addContent('Import', json_encode('title' => $item->getTitle()));

I see the title of my record in the response object.

I then tried doing this:

$ajaxObj->addContent('Import', json_encode($item));

This didn't work. How do I json encode all the properties of my record?

Thanks for any help

Stephen. 



More information about the TYPO3-project-typo3v4mvc mailing list