return json error when user service "Leaderboard Service"

0 votes

 

debug show result is true but callback error.

 

Json String : {"app42":{"game":{"scores":{"score":{"value":1000,"userName":"370514556479357"}},"name":"Level 1"}}}

Signature : 7965S17izenElfAdTtNTyDSf8NY%3D

Http url : 1.0/game/scoreboard

QueryString is ?

Requested URL is https://api.shephertz.com/cloud/1.0/game/scoreboard?

 Setting Header value : SDKName : AS3

 Setting Header value : apiKey : b36a0b57eb839fe14281eb240e77d906bf9251ee85ecf600693be501c26c9870

 Setting Header value : dataACL : [{"null":null}]

 Setting Header value : resource : game/scoreboard

 Setting Header value : signature : 7965S17izenElfAdTtNTyDSf8NY%3D

 Setting Header value : timeStamp : 2015-03-26T7:54:2.798Z

 Setting Header value : version : 1.0

Response : {"app42":{"response":{"success":true,"games":{"game":{"name":"Level 1","scores":{"score":{"userName":"370514556479357","value":1000,"createdOn":"2015-03-26T07:54:05.307Z","scoreId":"fif+ph+DviGxxBj2wgFYaNDEl6o="}}}}}}}

ArgumentError: Error #1063: Argument count mismatch on com.adobe.serialization.json::JSONDecoder(). Expected 2, got 1.

at com.adobe.serialization.json::JSON$/decode()[/Users/mesh/src/as3corelib/src/com/adobe/serialization/json/JSON.as:78]

at com.shephertz.app42.paas.sdk.as3::App42ResponseBuilder/getServiceJSONObject()[E:\Samita_work\gitProject_API\App42_Flash_API_Desktop\App42_ActionScript_API\src\com\shephertz\app42\paas\sdk\as3\App42ResponseBuilder.as:16]

at com.shephertz.app42.paas.sdk.as3.game::GameResponseBuilder/buildResponse()[E:\Samita_work\gitProject_API\App42_Flash_API_Desktop\App42_ActionScript_API\src\com\shephertz\app42\paas\sdk\as3\game\GameResponseBuilder.as:18]

at com.shephertz.app42.paas.sdk.as3.game::ScoreBoardService/onSuccess()[E:\Samita_work\gitProject_API\App42_Flash_API_Desktop\App42_ActionScript_API\src\com\shephertz\app42\paas\sdk\as3\game\ScoreBoardService.as:777]

at com.shephertz.app42.paas.sdk.as3.connection::RESTConnector/completeHandler()[E:\Samita_work\gitProject_API\App42_Flash_API_Desktop\App42_ActionScript_API\src\com\shephertz\app42\paas\sdk\as3\connection\RESTConnector.as:347]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/onComplete()

asked Mar 26, 2015 in App42 Cloud API-BaaS by Diệp Bảo Tuấn (10 points)
Could you please share App42 SDK version and the platform n which you are working? It will help us to replicate the same at our end and provide better support to you.

Thanks,
Himanshu Sharma
For which platform you are targeting your build? Is it a simple saveScore or are you trying with same additional data? This is working at our end and need these additional info to replicate.
Hi Himanshu Sharma, I'm using App42 Actionscript SDK mobile 2.7, Adobe air 17.0. I hope you help soon.
Thanks.
Tuan Diep

1 Answer

0 votes
Hello Tuan,

Apologies for getting late back to you and thanks for sharing the details.  We have tested with the same configuration which you have stated and its running fine at our end. Could you please share your sample project with us? It will help us to replicate at our end and provide better support to you.

Himanshu Sharma
answered Apr 1, 2015 by hs00105 (2,005 points)
I know why.

If you have another version of JSONDecoder in your project, which isn't unusual (in my case Chartboost.ane has a JSONDecoder file), it definitely requires two arguments (JSONDecoder (s:String, strict:Boolean)).  I'm not sure why App42 swc requires only one.  This still seems to be true in 2.7

Unfortunately, this is a small issue but I don't think I can fix this without the source code for either the Chartboost Ane or the App42 swc.
Hello Kelsonkug,

I hope your query has been answered over here(http://forum.shephertz.com/?qa=7954/json-decoder-issue-in-adobe-app42-swc). Please let me know if you need any help from my side.

Regards,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...