Error Serializing of Quicksight assets using AWS SDK for .NET

Using .NET to serialize, specifically the template definition, with the JSON library included in the SDK , ThirdParty.Json.LitJson, does not work.

Serializing

 TemplateVersionDefinition myTemplate = GetTemplate() ....
 var json = JsonMapper.ToJson(myTemplate);   

Error:

Max allowed object depth reached while trying to export from type 

Hello @brownm99, what resource are you trying to use TemplateVersionDefinition on? Are you trying to retrieve the JSON for an analysis, dashboard, or dataset? It seems like the JSON object is too large so maybe we can figure out why with some more details about what you are hoping to accomplish.

Asset type is a template. Use case is using the template in a CICD pipeline with customer rules around creating dashboards from source

  1. Export template definition to file system (for version control ) by calling DescribeTemplateDefinition

  2. Deserialize TemplateVersionDefinition from source

  3. Modify object based on customer rules (i.e. limiting pages, replacing placeholders with actual datasets

  4. Deploy dashboard using CreateDashboard …

Hello @brownm99 - I would recommend filing a case with AWS Support where we can
dive into the details so that we can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!

Hello @brownm99, I am going to archive this question. If you still need assistance with this topic after discussing it with support, please post a new question in the community and link to this topic. Thank you!