I'm having this issue because i only want specific fields from the default JSON that returns Google Cloud Document AI. The fields i want to get using the field mask are: "text" and inside "pages" i just only want tables
and formFields
. For text
tables
i haven't got any issues doing the field_mask
param in the request like this:
# Configure the process request
request = documentai.ProcessRequest(
name=resource_name, raw_document=raw_document, field_mask="text,pages.tables"
)
The problem is only when im trying to access the fields inside "formFields" because i just want the marked fields i show in this image of the JSON:
I tried using field_mask="pages.formFields.fieldName.textAnchor.content,pages.formFields.fieldValue.textAnchor.content"
And when i do the request using Postman, the request take a long time with "Sending request" message and never returns anything.
I want to remember that this problem only happens when im trying to access a field inside "formFields", if i don't try this the request is successful so i think the problem isn't associated with how i do the request, i think is just im not using the correct syntax and i can't find any information or documentation about this. Thank you and advise me if you need more information or code.