Not able to Serilize RecognitionResult using MemoryPack (.net)

Hi Team,

We are not able to serialize RecognitionResult using MemoryPack 1.10.0 .Can you please do the need full.
Getting attached error in
MempackError.jpg (17.6 KB)

Sample Code:

     public static void MemPack()
	   {
	
		AsposeOcr api = new AsposeOcr();
		License lic = new License();
		lic.SetLicense("Aspose.Total.NET.lic");

		string imgPath = @"D:\OCR\TIFFs\1PageGood.tif";
		OcrInput ocrInput = new OcrInput(InputType.SingleImage);
		ocrInput.Add(imgPath);
		var result = api.Recognize(ocrInput);

		CompleteResult Source = new CompleteResult();
		CompleteResult Destination = new CompleteResult();
		Source.ProcessedResults.AddRange(result);

		var src = MemoryPackSerializer.Serialize(typeof(CompleteResult),Source);

		Destination = MemoryPackSerializer.Deserialize<CompleteResult>(src);

		AsposeOcr.SaveMultipageDocument("D:\\OCR\\TIFFs\\mempack.pdf", Aspose.OCR.SaveFormat.Pdf, Destination.ProcessedResults);

	}


 public partial class CompleteResult
{
	[MemoryPackConstructor]
	public CompleteResult()
	{
		ProcessedResults = new List<RecognitionResult>();
	}
	[MemoryPackAllowSerialize]
	public List<RecognitionResult> ProcessedResults { get; set; }
}

@Gpatil

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): OCRNET-771

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi @asad.ali ,

When can we expect this fix to be available to us

@Gpatil

The ticket is sadly not fully investigated yet. However, we will surely inform as soon as its analysis is done and we have some news related to its fix ETA. Please spare us some time.

Hi @asad.ali ,
Good Morning, We your team able to investigate and fix this issue.

@Gpatil

Investigation under the ticket has been underway under our schedule. However, it is not yet completed. As soon as it is done, we will share updates with you. Please spare us some time.

Hi, @Gpatil

I’m a developer of Aspose.OCR team

Sorry for the delay with an answer

I understand your problem. Your library demands the attributes before the fields in the classes for serialization. Our RecognitionResult supports general serialization. So I can advise you:

  • use Binary or Soap serialization (RecognitionResult supports BinaryFormatter and SoapFormatter)