thanks, it really works. But I still have a problem when I try to
serialize a proxy class of an Entity.

e.g.
Class DIct {
  protected $words;
}

Class TestController {

    public function testAction() {

       $word = $dict->getWords()->first(); // $word is here actually a
proxy class of Word
       $serializer = $this->get('serializer');
       return  new Response( $serializer->serialize($word  , 'json'));

    }
}

It's just an example, my question is how to serialize the proxy class
$word or could we get the original Word instance from proxy?




On Oct 12, 1:13 pm, Johannes Schmitt <[email protected]> wrote:
> You can try my bundle:http://github.com/schmittjoh/JMSSerializerBundle
>
> regards,
> Johannes
>
>
>
>
>
>
>
> On Wed, Oct 12, 2011 at 9:14 AM, Alan Lee <[email protected]> wrote:
> > Hello,
>
> > I'm trying to serialize an Doctrine Entity to json, but my problem is
> > the GetSetMethodNormalizer  seems not to work well with recursive
> > Entity.
>
> > so what's the standard or better solution if I wanna show an Entity in
> > json format?
>
> > any comments or ideas are very welcome
>
> > --
> > 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

-- 
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

Reply via email to