Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONEncoder.objectToString() fails when the object has "internal" property #183

Open
demauk opened this issue Feb 1, 2012 · 0 comments
Open

Comments

@demauk
Copy link

demauk commented Feb 1, 2012

An object o can have an internal public var myvar variable, and v:XML = classInfo.variable will correctly report it as a public variable, but o[ v.@name ] will fail because the variable is not available to us.

This can be fixed in a similar way to the check for Transient metadata. An internal variable or accessor with have a uri attribute set to "http://www.adobe.com/2006/flex/mx/internal":

// If property is declared as internal, skip it
if ( v.@uri != '' && String(v.@uri).indexOf( "internal" ) != -1 )
{
  continue;
}

I've implemented this on my fork: https://github.com/demauk/as3corelib/blob/master/src/com/adobe/serialization/json/JSONEncoder.as#L536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant