Du , resulttable

In DU , resulttable what json array or json can accept , because I seralize newtsoft.json.jsonconvert.seralize( of resulttable (jsonString) . This is shown json error what class what are the accepted json schema for resulttable data.

Hi @Harikishore_S1 ,

  • ResultTable is typically a DataTable extracted from a DataSet returned by the Export Extraction Results activity.
  • This activity takes an ExtractionResult and outputs a DataSet containing one or more DataTable objects.
  • UiPath Document Understanding expects JSON that matches the predefined schema used during training or defined in the Taxonomy Manager .
    Example schema:
{
  "fields": {
    "InvoiceNumber": "INV-12345",
    "InvoiceDate": "2025-08-19",
    "TotalAmount": "1000.00"
  },
  "lineItems": [
    {
      "Description": "Item A",
      "Quantity": "2",
      "Price": "500"
    },
    {
      "Description": "Item B",
      "Quantity": "1",
      "Price": "500"
    }
  ]
}

This format must match the schema used in AI Center or defined in your taxonomy. Document Understanding - Use a predefined schema

Using JsonConvert.SerializeObject(resultTable) may result in errors or unusable JSON because:

  • DataTable serialization produces nested structures.
  • DU expects a flat field-value mapping or structured arrays matching the schema.

You must reshape the ResultTable to match the schema before serialization.
Steps:
1st Convert ResultTable to a dictionary or structured object:

Dim dict As New Dictionary(Of String, String)
For Each row In resultTable.Rows
    dict(row("FieldName").ToString) = row("Value").ToString
Next

2nd Serialize using: JsonConvert.SerializeObject(dict), this produces a flat JSON object that aligns with DU expectations.

Check this and let us know your output.

Happy Automation!

1 Like

@Harikishore_S1

May I know what you are trying to do?

Cheers

Invoice line item give empty table, resulttable datatype variable have empty. So don’t have line item values .in this case I need to add one row in resulttable datatype variable.
All in Document understanding , it’s not in normal datatable.
Variable type is resulttable.