Storage Service - Find Document Problem with Corona SDK

0 votes
Hello,

I cannot get Json documents with the command "object:getJsonDocList():getJsonDoc()"
I got the answer  "table: 07092D0".

I checked the response message with the command "object:getStrResponse()" and all information is in the string.

Can you help me? Thank you!

I am running the following code:

storageService:findDocumentById(dbName, collectionName,docId,App42CallBack)  
function App42CallBack:onSuccess(object)  
    print("dbName is "..object:getDbName())  
    print("DocId is "..object:getJsonDocList():getDocId())  
    print("CreatedAt is "..object:getJsonDocList():getCreatedAt())  
    print(object:getJsonDocList():getJsonDoc())
    print(object:getStrResponse())
    
end  
function App42CallBack:onException(exception)  
    print("Message is : "..exception:getMessage())  
    print("App Error code is : "..exception:getAppErrorCode())  
    print("Http Error code is "..exception:getHttpErrorCode())  
    print("Detail is : "..exception:getDetails())  
end
closed with the note: Resolved
asked Mar 21, 2015 in App42 Cloud API-BaaS by germanfv (18 points)
closed Mar 24, 2015 by germanfv
Could you please encode the table and let me know what you are getting in response? It will help us to provide better support to you. Use the below line of code to encode your table in JSON format:

local JSON = require("App42-Lua-API.JSON")
print(JSON:encode(object:getJsonDocList():getJsonDoc()))


Thanks,
Himanshu Sharma
Hi Himanshu,

It works!

I want to say thank you for your work on app42 cloud

Thanks you very much!
Great to hear that your query has been resolved. Kindly close this thread if you don't have more questions for us.
Thanks,
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
...