I am having trouble passing valid JSON between two different Java AWS Lambda functions. The first function generates rawJson "String" that is formatted like this:
rawJson: [
{
"id": 1,
"createdOn": 1535177185000,
"text": "test text"
}
]
This is passed to a second Lambda function:
request.withFunctionName(FUNCTION_NAME).withPayload(rawJson);
awsLambdaClient.invoke(request);
At the beginning of the second Lambda function, I print the value of the input Object:
inputObject: [{id=1, createdOn=1535177185000, text=test text}]
The quotes have been stripped and this is no longer valid JSON. Any attempt to map this back to my POJOs (or to even have my Lambda function accept a "String" like it should, instead of an "Object") results in a JSON-related exception.
Why is my valid JSON becoming malformed between the two Lambdas?