Copy link to clipboard
Copied
Hi,
Any advise is appreciated.
I have a AIR for iOS file previously done in Flash Professional CC 2015, with com.adobe.serialization.json.JSON and com.adobe.serialization.json.JSONParseError imported in an AS file to parse out and decode the JSON string for oauth2 procedure. Since I upgraded to Adobe Animate CC 2015, today when I opened up the file and tried to publish the IPA, it returns the following errors:
1172: Definition com.adobe.serialization.json:JSON could not be found.
1172: Definition com.adobe.serialization.json:JSONParseError could not be found.
1120: Access of undefined property JSON.
1046: Type was not found or was not a compile-time constant: JSONParseError.
1046: Type was not found or was not a compile-time constant: JSONParseError.
I don't know what caused this in the new Animate CC and how to fix this problem. Please help if you may provide any insights/solutions. Thank you very much!
Regards,
yu
The serialization code was an extra thing that you installed at some point. If you find those folders (adobe/serialization/json, and so on) you should be able to put them into your project, and things would be ok again.
But, you should think about not doing that. A while ago those routines were made native to AS3 code, and now work a lot faster. Here's the documentation for the native one:
Copy link to clipboard
Copied
The serialization code was an extra thing that you installed at some point. If you find those folders (adobe/serialization/json, and so on) you should be able to put them into your project, and things would be ok again.
But, you should think about not doing that. A while ago those routines were made native to AS3 code, and now work a lot faster. Here's the documentation for the native one:
Copy link to clipboard
Copied
Thank you, Colin, for the response. I will check that out.
Copy link to clipboard
Copied
I am getting the same error on a new project trying to use the built in one. It appears there with code hints as I type it but I get a definition not found even though it actually helps me input the import string. Using Animate 2015.1. Any thoughts?
import com.adobe.serialization.json.JSON;
Copy link to clipboard
Copied
If I add as3corelib.swc, I see the Definition not found errors go away but then I get a call to possibly undefined method 'encode' through static type class.
var messages:Array = new Array (); | |||||
messages.push ({"test":"value"}); | |||||
messages.push ({"test2":"value2"}); |
var JsonObj:String = JSON.encode(messages);