com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

0

I am getting this error in my lambda function when i am calling my lambda without any parameter.

I am using java 11 as a runtime

已提問 9 個月前檢視次數 715 次
1 個回答
0

Hi,

This kind of error is not related to AWS Lambda but to the way that you use Google's Gson when you parse input data.

Have a look at this video to debug your code and solve: https://www.youtube.com/watch?v=k-F4Z7U7fpM

Best,

Didier

profile pictureAWS
專家
已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南