saveService = new HTTPService();
var action_url:String = "save_score.json";
saveService.url =api_url;
saveService.method = "POST";
saveService.resultFormat = mx.rpc.http.HTTPService.RESULT_FORMAT_TEXT;
saveService.addEventListener(ResultEvent.RESULT, saveResult);
saveService.addEventListener(FaultEvent.FAULT, saveFault);
var params:Object = new Object();;
params.score_id = SCORE_ID;
params.boxes = new Array();
var boxArray:Array = [
{
"column" : 1,
"row" : 1,
"symbol" : "GUItest",
"explanation" : "GUItest",
"pronunciation" : "GUItest",
"subsymbols" : [
{
"division" : 1,
"subsymbol_id" : 1
}
]
}]
params.boxes = boxArray;
saveService.send();
我通过使用URLRequest,URLVariables,URLLoader来回避这个问题,但我希望你的建议。
答案 0 :(得分:0)
通常,在POST对象或从HTTP回复数据构建对象时,请查看HTTPService's serializationFilter。
您提供了一个适配器,它应该能够进行实际的对象/平面和平面/对象转换。