question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Custom Model - Table Field - Document.Fields.X.ArrayValue is empty on Json serialization

See original GitHub issue

Library 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:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kinelskicommented, Aug 10, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] BoundingBox is empty on Json serialization #28886
BoundingBox should not be empty in the serialized JSON ... [BUG] Custom Model - Table Field - Document.Fields.X.ArrayValue is empty on Json ......
Read more >
C#: JSON Serialization of List<CustomClass> returns ...
I'm guessing it has to do with the fact that I'm using a List of a custom Class. Is that a known limitation...
Read more >
Custom Form Recognizer Form model issue with empty fields
Hi,. We are building a template model for a custom form and are encountering an issue with empty fields. Whenever there is an...
Read more >
Json save empty, even though class serializable?
Dear Community, I am trying to save the stats of enemies in a Json file, using a serializable, simple class: [Serializable] public class......
Read more >
MySQL 8.0 Reference Manual :: 11.5 The JSON Data Type
MySQL NDB Cluster 8.0 supports JSON columns and MySQL JSON functions, including creation of an index on a column generated from a JSON...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found