[FLOW3-general] Creating a JSON output

Pankaj Lele pankaj at lelesys.com
Tue Nov 6 07:13:00 CET 2012


Hi François,

>
> I would like to output a list of all clients, with their instances and
> their monitorings. To achieve this I have tried the following:
>
> https://gist.github.com/4018306
>
> but the JSON view is not descending into instances (nor monitorings,
> obviously).

If you feed the variable (clients) with an array of objects (the query 
result returned by the repository->findAll() method) then probably you 
have to use the _descendAll as outer wrap. I had a talk on REST API with 
FLOW3 at T3CON12ASIA. You can have look at the code example 
https://github.com/pankajlele/t3con12asia/blob/master/FLOW3Application/Packages/Application/Lelesys.EventsExample/Classes/Controller/EventController.php


-- 
Pankaj Lele
CTO - Lelesys, India
http://www.lelesys.com
Twitter: @pankajlele


More information about the FLOW3-general mailing list