[BUG] Custom Model - Table Field - Document.Fields.X.ArrayValue is empty on Json serialization
See original GitHub issueLibrary name and version
Azure.AI.FormRecognizer 4.0.0-beta.3
Describe the bug
I’ve created a custom model with a table property. These values are displayed in the Result pane of the form recognizer studio test function.
"Items": { "type": "array", "valueArray": [ { "type": "object", "valueObject": { "Quantity": { "type": "string", "valueString": "1.00", "content": "1.00", "boundingRegions": [ { "pageNumber": 1, "boundingBox": [ 1.18, 4.33, 1.4, 4.33, 1.4, 4.425, 1.18, 4.425 ] } ], "spans": [ { "offset": 476, "length": 4 } ] },
But the payload that’s been returned from the StartAnalyzeDocumentAsync method doesn’t contain these values.
"Items": { "ValueType": 6, "Content": null, "BoundingRegions": [ ], "Spans": [ ], "Confidence": null }
I’m using System.Text.Json.JsonSerializer.Serialize() with the default configuration.
Other objects, properties and values have bound. So I’m able to get the data from the models string properties.
I think I have the same issue as this person: “[BUG] BoundingBox is empty on Json serialization”
Expected behavior
When using the same document. I would like the json object displayed in the “form recognizer studio - results pane” to match the serialized payload.
Actual behavior
Properties are not being bound.
Reproduction Steps
Add a custom table field the custom model and train. Ensure that a test of the model returns results (In Form Recognizer Studio) Use Nuget package to call API and save serialization of AnalyzeDocumentOperation.Value to file. Inspect file.
Environment
.NET SDK (reflecting any global.json): Version: 6.0.201 Commit: ef40e6aa06
Runtime Environment: OS Name: Windows OS Version: 10.0.22000 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.201\
Host (useful for support): Version: 6.0.3 Commit: c24d9a9c91
.NET SDKs installed: 5.0.101 [C:\Program Files\dotnet\sdk] 5.0.403 [C:\Program Files\dotnet\sdk] 5.0.406 [C:\Program Files\dotnet\sdk] 6.0.201 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
@kinelski Thanks! I’ve upgrade to beta5 and I see the changelog here https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md#400-beta5-2022-08-09
@ss-proc Just letting you know we released 4.0.0-beta.5 yesterday. This version exposes the
BoundingPolygon.Length
property we discussed.I’m closing the issue since the original question seems to be addressed, but feel free to open a new one if you have further questions.