Hi Piotr, you should not be concerned about that. For example, your
bindable VO is also IEventDispatcher but you did not code that. The
compiler did it for you after you marked it [Bindable]. So it could also,
for example, add an interface that indicates the class has compiler
generated toJson support if that is helpful to check at runtime. Maybe the
interface is not needed if all you are looking for is the autogenerated
toJson method.

Also my suggestion may not be the best option and I was focusing more on
json to VO than VO to json in that discussion.

-Greg
[sent from my phone]

On 22/04/2017 7:07 PM, "piotrz" <piotrzarzyck...@gmail.com> wrote:

> Hi Greg,
>
> Reading your code we landed again to giving our VO some kind of interface ?
> If yes, that's resolve issue, but it won't be to handy. I don't want to
> implement by my VO any interface - I just wanted to have function toJSON -
> which is recognizable by deserializer default.
>
> var book:Book = new Book();
>
> var str:String = JSON.stringify(book) - inside stringify toJSON is being
> called if exists.
>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: http://apache-flex-
> development.2333347.n4.nabble.com/FlexJS-Issue-with-JSON-
> stringify-and-Bindable-VO-objects-tp61195p61277.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>

Reply via email to