C# DI API doesn't write value field

Michael 45 Reputation points
2023-09-15T12:48:27.1766667+00:00

Hello,

we are using both the Python and C# API for Document Intelligence to process documents and we ran into a problem with the Json result for the C# API which doesn't return the value field.

Python:

User's image

C#:

User's image

To serialize the response from DI in we use System.Text.Json. Any idea what could be the cause of this problem?

Thanks in advance!

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,100 questions
{count} votes

Accepted answer
  1. VasaviLankipalle-MSFT 18,676 Reputation points Moderator
    2023-09-16T05:10:09.34+00:00

    Hello @Michael , Thanks for using Microsoft Q&A Platform.

    Looks like this known issue with C# SDK.
    Regarding the empty fields, if you want to get the original raw response returned by the service, you can do that by invoking operation.GetRawResponse().Content and parsing that data into a string.

    To get the actual field value as presented in DI Studio, can you try invoking result.Documents[0].Fields["replacewithfieldname"].Value.AsString() instead.

    Try these and let us know.

    I hope this helps.

    Regards,
    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.