0

Found this question but it was Java specific, and I need a .net answer:

Converting DynamoDB JSON to Standard JSON with Java

Anyway to do that in C#? Trying to set up a test framework that reads a json file with the dynamodb json as an input for mocked data. I can't seem to figure it out.

MontysGoat
  • 23
  • 3

1 Answers1

1

You should get pretty JSON from the document object using ToJsonPretty extension method.

Document document = _context.ToDocument(entity); // ignore this line
string jsonString = document.ToJsonPretty(); <--- This is what you need

You would need Amazon.DynamoDBv2.DocumentModel namespace for this message.

Ankush Jain
  • 5,654
  • 4
  • 32
  • 57