Open dr86ansixavier opened 1 year ago
This is the sample JSON which I'm trying to deserialise. When we try to deserialise complex nested objects, it's recursively calling again and again. But if we add the above condition which I mentioned, it will solve the problem.
{ "id" : 55, "references" : [ ], "groupingTarget" : false, "metaTarget" : true, "relativeDataTargets" : [ { "id" : 56, "references" : [ ], "groupingTarget" : false, "metaTarget" : false, "name" : "meta.tracked_statement_website_key", "operator" : { "regEx" : "(([0-9]{1,2})[-/\\.]([0-9]{1,2})[-/\\.]([0-9]{2,4}+))", "groupCount" : -1 }, "xPath" : "./parent::td/parent::tr/child::td[count(//th[contains(text(),'Invoice Date')]/preceding-sibling::th)+1]/text()", "variableSubstitution" : false, "reinitializeVariable" : false, "index" : 0 } ], "xPath" : ".//text()", "alternateXPaths" : null, "variableSubstitution" : false, "reinitializeVariable" : false, "index" : 0 };
@shakilsiraj I'm not sure who should I reach out. Will this be taken care? Or should I raise any PR by forking this repo? Can you guide me the next steps?
Hi Team,
Please look at the below code segment from index.ts file. It's doing deserialisation twice per object because we are assigning the first element for deserialisation first and then the popped element again.
`const runDeserialization = (conversionFunctionStructures: ConversionFunctionStructure[]): void => {