Error While assigning JSON to Local Variables

Hi,

I'm consuming an API, the response of which is in JSON. I'm assigning the API response to local variables in the Preparation of a form but it's throwing the below error. 

can anyone help?



at ssCAPIs.Actions.ActionGetDetails(HeContext heContext, STPostGetDetailsDetailsRequestStructure inParamAPIRequest, String inParamCallingURL, STPostGetDetailsResponse2Structure & outParamEmployment)

at ssPortal.RsseSpaceCAPIs.MssGetDetails(HeContext heContext, IRecord inParamAPIRequest, String inParamCallingURL, IRecord & outParamEmployment)

at ssPortal.Actions.ActionGetDetails(HeContext heContext, STPostGetDetailsRequestStructure inParamAPIRequest, String inParamCallingURL, STPostGetDetailsResponse2Structure & outParamEmployment)

at ssPortal.Flows.FlowFormFlow.ScrnForm.Preparation(HeContext heContext)

at ssPortal.Flows.FlowFormFlow.ScrnForm.Page_Load(Object sender, EventArgs e)

at System.Web.UI.Control.OnLoad(EventArgs e)

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Hi Shashankit,

Are you sure your structure is same with API response?
Could you try to assign API JSON result to a text variable? If it works, I suggest you compare the structure with JSON result.

Hope it helps.

With best regards,
F.Karatay

Hi Shashankit,

That's not an error, that's part of the error stack - you don't show the actual error. But from the error stack, I'm deducing you are reading the database, which throws an error because you use a wrong identifier value (probably a null identifier), which has absolutely nothing to do with assigning JSON to a local variable.

Please please please debug your application before asking questions in the forum if something goes wrong!