-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ah sorry, did not think about the encoding, you are right.
can the FOS\RestBundle help with this? lukas? cheers,david Am 07.04.2011 18:35, schrieb MMac: > Thanks for the response David. I've been fiddling around with the Esi > class and it looks like a bit more than just adding the application/ > json content type to the default types is going to have to go into it. > > The content in the json response will be json_encoded (and therefore > escaped). Because even the esi tags in the json response are escaped a > small change in the parsing for esi tags is needed. In addition, after > all of the esi tags are parsed, executed, and filled into the > response, these filled in parts will need to be prepared for json and > properly formatted. > > This would be extremely helpful to me and hopefully other users. I'd > prefer not to use XML for reasons I don't need to go into here (much > bigger debate). > > This is of course, just a suggestion. Thoughts? > > Thanks, > Marc > > On Apr 7, 2:32 am, David Buchmann <[email protected]> wrote: > hi, > > you can write your own service declaration for the esi service for your > application and pass an argument to the constructor with the types that > should be handled. see the default service configuration: > FrameworkBundle/Resources/config/esi.xml > > @the gurus: is there a reason json is not in the default list? > > cheers, > david > > Am 06.04.2011 19:01, schrieb MMac: > > > > > > > > > >>>> My use case: > >>>> I'm building an ajax application that, for each request, returns the >>>> parts of the page that need to be updated (via json). One 'page part' >>>> is a 'feed' twig template that renders article teasers through ESI tag >>>> calls. These esi tags are not parsed when returning the json object. >>>> Thus the site works fine in development but not in production with >>>> caching on. > >>>> I've taken a look in the Esi.class file and see line 39 setting the >>>> array of default content types to be parsed for Esi but I'm having >>>> trouble parsing esi tags, injecting the esi content, and returning a >>>> well formated json string. > >>>> Any help or thoughts would be much appreciated. > >>>> Thanks, >>>> Marc > - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2d7mMACgkQqBnXnqWBgIu+5QCgwNlUk7Bl0owkooLcSkf3QGsK CtcAnR58X5pvixOm1wrele5LSkP77J3e =bsJ0 -----END PGP SIGNATURE----- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
