Skip to content

NDJSON format not recognized #82

@adobni

Description

@adobni

Describe the bug
Format NDJSON is not recognized.

To Reproduce

  1. Installed with brew.
  2. Execute a transformation with input payload format application/x-ndjson
$ dw run -i payload=in.ndjson "%dw 2.0  output application/json  input payload  application/x-ndjson  --- payload"
[ERROR] Error while executing the script:
[ERROR] Unknown content type `application/x-ndjson`. Supported content types are: `application/dw`, `application/csv`, `application/json`, `multipart/form-data`, `application/octet-stream`, `text/x-java-properties`, `text/plain`, `application/x-www-form-urlencoded`, `application/xml`, `application/yaml`

1| %dw 2.0  output application/json  input payload  application/x-ndjson  --- payload
                                                    ^^^^^^^^^^^^^^^^^^^^
Trace:
  at anonymous::main (line: 1, column: 50) at:

1| %dw 2.0  output application/json  input payload  application/x-ndjson  --- payload
                                                    ^^^^^^^^^^^^^^^^^^^^

Expected behavior
The readme file indicates that the format is supported,.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macOS 13.3.1. Also happens in Windows.
dw --version
Command Line : V1.0.34
Runtime : V2.6.0-SNAPSHOT

Additional context
Issue originally mentioned in Stackoverflow question: https://stackoverflow.com/questions/76292778/dataweave-in-windows-to-process-ndjson-files-x-ndjson-does-not-work

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions