I spent hours around a possibly stupid problem relative to JSON encoding in FLASH.
I Try to do something very simple : I make an object and I want it to be serialize
JSON.parse
and JSON.stringfy
are the methods you are looking for in Flash Player 11+.
JSON.encode
and JSON.decode
were part of the Adobe AS3 lib but since the Flash Player has a native JSON parser now you don't need that class.
All right. As usual, I found the answer a few seconds after posting my question.
JSON in now incorporated directly in As3, so no need to use com.adobe.serialization.json.JSON
So I delete the import and replaced :
var myJson:String = JSON.encode(myData);
by
var myJson:String = JSON.stringify(myData);
and it works.