bijilsandroid / as3corelib

Automatically exported from code.google.com/p/as3corelib
0 stars 0 forks source link

[Transient] not supported and writeonly accessor exception #116

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The [Transient] metadata tag help to identifies a property that should be
omitted for serialization process and currently is not handled.

And there is a exception when the object have read only accessor.

I changed the source to handle those situations.

What steps will reproduce the problem?
1.
    public class A
    {
        public var x:Number = 1234;     
        [Transient]
        public var y:Number = 567788;       
        public function get b():Number{
            return x + y;
        }       
        public function set z(z:Number):void{
            z++;
        }
    }
}

2. JSON.encode( new A )

What is the expected output? 
-{"b":569022,"x":1234}

What do you see instead?
-Exception

Original issue reported on code.google.com by daniel.d...@gmail.com on 15 Aug 2009 at 11:55

Attachments:

GoogleCodeExporter commented 8 years ago
What version were you using?  This should've been fixed as of r92.

Original comment by darron.schall on 15 Aug 2009 at 4:50

GoogleCodeExporter commented 8 years ago
The [Transient] part was already working, but there was an exception being 
thrown for illegal read on write-only 
properties when encoding custom classes.  That has been fixed in r96.

Thanks for helping to make the library better.  :-)

Original comment by darron.schall on 15 Aug 2009 at 5:06