Skip to content

Commit

Permalink
Fixed an issue where delimited JSON string payload was not parsed pro…
Browse files Browse the repository at this point in the history
…perly by Lambda Test Tool.
  • Loading branch information
ashishdhingra committed Oct 28, 2024
1 parent 5d11116 commit 2f53875
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<OutputType>Exe</OutputType>
<Description>A tool to help debug and test your .NET Core AWS Lambda functions locally.</Description>
<LangVersion>Latest</LangVersion>
<VersionPrefix>0.15.2</VersionPrefix>
<VersionPrefix>0.15.3</VersionPrefix>
<Product>AWS .NET Lambda Test Tool</Product>
<Copyright>Apache 2</Copyright>
<PackageTags>AWS;Amazon;Lambda</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<Description>A tool to help debug and test your .NET 6.0 AWS Lambda functions locally.</Description>
<VersionPrefix>0.15.2</VersionPrefix>
<VersionPrefix>0.15.3</VersionPrefix>
<Product>AWS .NET Lambda Test Tool</Product>
<Copyright>Apache 2</Copyright>
<PackageTags>AWS;Amazon;Lambda</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<Description>A tool to help debug and test your .NET 7.0 AWS Lambda functions locally.</Description>
<VersionPrefix>0.15.2</VersionPrefix>
<VersionPrefix>0.15.3</VersionPrefix>
<Product>AWS .NET Lambda Test Tool</Product>
<Copyright>Apache 2</Copyright>
<PackageTags>AWS;Amazon;Lambda</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<Description>A tool to help debug and test your .NET 8.0 AWS Lambda functions locally.</Description>
<VersionPrefix>0.15.2</VersionPrefix>
<VersionPrefix>0.15.3</VersionPrefix>
<Product>AWS .NET Lambda Test Tool</Product>
<Copyright>Apache 2</Copyright>
<PackageTags>AWS;Amazon;Lambda</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ private static string DeterminePayload(LocalLambdaOptions localLambdaOptions, Co
}
}

// Enclose simple string payload in double quotes so that it's parsed properly by Lambda JSON serializer.
if (!payload.StartsWith("{") && !payload.StartsWith("\""))
{
payload = "\"" + payload + "\"";
}

return payload;
}

Expand Down

0 comments on commit 2f53875

Please sign in to comment.