Skip to content

[Transient] not supported and writeonly accessor exception #112

Closed
darronschall opened this Issue Jul 28, 2010 · 2 comments

1 participant

@darronschall

Originally filed by daniel.d...@gmail.com on 2009-08-15T11:55:15

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++;
}
}
}

  1. JSON.encode( new A )

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

What do you see instead?
-Exception

@darronschall

Updated by darron.schall on 2009-08-15T16:50:11

What version were you using? This should've been fixed as of r92.

Original ticket set status to Duplicate (we converted to closed)

@darronschall

Updated by darron.schall on 2009-08-15T17:06:16

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. :-)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.