MetricSign
EN|NLRequest Access
Medium severitydata flow

Power BI Refresh Error:
DF-JSON-WrongDocumentForm

What does this error mean?

ADF Mapping Data Flows expect JSON source files to match one of three document forms: single document, array of documents, or newline-delimited JSON (NDJSON/JSON Lines).

Common causes

  • 1The 'Document form' setting in the JSON dataset is set to 'Single document' but the file contains a JSON array
  • 2The file uses newline-delimited JSON (one JSON object per line) but the dataset is configured as 'Single document' or 'Array of documents'
  • 3The file has a multi-root structure (multiple top-level objects not wrapped in an array) which no standard document form supports
  • 4The JSON file was recently restructured by the upstream system and the dataset document form was not updated to match

How to fix it

  1. 1In ADF Studio, open the JSON dataset and click 'Connection' > check the 'Document form' dropdown.
  2. 2Open a sample in a text editor: starts with '[' → 'Array of documents'; each line is a JSON object → 'Set of objects' (NDJSON); one JSON object → 'Single document'.
  3. 3Update the 'Document form' setting to match the actual file structure and click OK.
  4. 4Enable debug mode and run a data preview on the source transformation to confirm the schema is parsed correctly.
  5. 5If the upstream system produces inconsistent document forms, add a preprocessing step to normalize the format before the data flow reads it.

Frequently asked questions

What are the three JSON document forms in ADF and how do I tell them apart?

'Single document': one JSON object starting with `{`. 'Array of documents': a JSON array starting with `[`. 'Set of objects' (NDJSON): one object per line. Open the file in a text editor to determine the form.

Can a folder contain JSON files with different document forms?

No — all files in a wildcard source must use the same document form. If the folder mixes forms, split sources by subfolder or preprocess the files to normalize them before ADF reads them.

Will this error occur if the JSON file is completely empty?

An empty file may trigger a different error (no data) rather than WrongDocumentForm. WrongDocumentForm specifically means there is content in the file but it does not match the expected structure.

Does this error appear in debug mode with a small sample?

Yes — document form validation happens at schema inference time, before any rows are processed. The error appears immediately when ADF attempts to parse the file structure, even with a single-row sample.

Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide

Other data flow errors