Share via

Any changes happened in the backend of Parse JSON Mapping data flow in ADF in Feb Week 2

Piyush Jain 0 Reputation points
2026-05-26T17:18:58.1433333+00:00

Hi All,

Is anyone else faced an issue with Json array not being parsed correctly in the ADF Mapping data flows. Earlier the string worked fined and able to parse the columns but it now shows Null

Json Array is like

[{"abc":"def", "xyz":["bcd", "ahdjwhg"],"uvw":["abc, def"]}]

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-05-26T17:19:13.3166667+00:00

    ADF mapping data flows did not change behavior specifically in “Feb Week 2” in the documentation, but the described symptom (JSON array suddenly not parsing and returning null) matches known JSON/CSV and JSON parsing issues and configuration pitfalls.

    Based on the JSON sample:

    [{"abc":"def", "xyz":["bcd", "ahdjwhg"],"uvw":["abc, def"]}]
    

    there are two likely causes and corresponding fixes:

    1. Wrong JSON document form / parsing settings

    If the JSON source or Parse transformation is misconfigured, ADF can fail schema inference and return nulls.

    Relevant error pattern in ADF:

    • Error code DF-JSON-WrongDocumentForm or DF-Executor-SystemInvalidJson with message about malformed records or unsupported encoding/multiline.

    Recommended checks:

    1. In the JSON source of the data flow, open JSON settings and try different Document form values:
      • Single document
      • Document per line
      • Array of documents The documentation explicitly states that most parsing errors are caused by a wrong Document form selection.
    2. If the JSON is produced by a Copy activity, verify:
      • Encoding (UTF-8/16/32 with BOM) vs. data flow JSON source settings.
      • Whether Single document is enabled when the file actually contains an array or multiple documents.
    3. Use Data preview and Inspect in the data flow to confirm the inferred schema and that the array fields (xyz, uvw) are recognized as arrays.
    4. JSON embedded in CSV / CDM or misread as multiple columns

    If the JSON array is stored as a string inside a CSV or CDM column, commas inside the JSON can cause the value to be split into multiple columns, which then breaks parsing and yields null.

    Known behavior:

    • When a JSON array or object is stored in a CSV column, commas inside the JSON are treated as column separators unless the value is properly quoted.
    • In CDM/CSV scenarios, ADF may infer one JSON attribute as multiple columns instead of a single JSON string column.

    Recommendation in this case:

    1. Ensure the JSON column is:
      • Double-quoted as a single CSV field.
      • Inner quotes escaped with a backslash (\). This ensures the entire JSON array is read as one string column.
    2. After the JSON is correctly ingested as a single string column, use a Parse transformation to convert it into a complex type (array/struct/map). The Parse transformation documentation recommends:
      • Use Detect type in the expression builder to infer the output schema from the JSON string.
      • Then use a Derived Column transformation to access nested elements.
    3. Special characters and attribute extraction issues

    If parsing complex types and extracting attributes (for example, using @model or keys with dashes), ADF can fail and return null. The documentation suggests:

    • For attributes like @model, convert the complex type to string, remove @ with replace, then parse again.
    • For JSON keys with -, use bracket notation and a variable:
        var bestScore = data["best-score"];
        { bestScore : { "section 1": 1234 } }
      
    1. Snowflake / VARIANT scenarios (if sink is Snowflake)

    If the JSON is being written to Snowflake VARIANT columns and suddenly fails:

    • Snowflake VARIANT columns only accept struct/map/array types from data flows, not raw strings.
    • Use a Parse transformation before the Snowflake sink to convert the JSON string into array/struct/map.

    Summary of actions to fix null parsing:

    1. Verify JSON Document form in the JSON source and adjust (Single document / Document per line / Array of documents).
    2. If JSON is inside CSV/CDM:
      • Ensure the JSON value is fully double-quoted and inner quotes escaped.
      • Reimport or re-read the file so the JSON is a single string column.
    3. Use Parse transformation with Detect type to convert the JSON string into arrays/structs, then access elements via Derived Column.
    4. For special keys (@, -), apply the documented workarounds (string replace, bracket notation).

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.