schmittjoh/JMSSerializerBundle — pull request #109 by anyx (2012-04-29 14:32:49+00:00)
Title: Add @Virtual annotation

@Virtual - method annotation, which allow to add calculated fields to serialized object.

For exampe object of class:

```php

namespace JMS\SerializerBundle\Tests\Fixtures;

use JMS\SerializerBundle\Annotation\SerializedName;
use JMS\SerializerBundle\Annotation\Virtual;

class ObjectWithVirtualProperty
{

protected $existField = 'value';

/**
*
* @Virtual(field="foo")
*/
public function getValue() {
return 'bar';
}
}
```
to be serialized as: '{"foo":"bar","exist_field":"value"}'