data-weave-cli icon indicating copy to clipboard operation
data-weave-cli copied to clipboard

NDJSON format not recognized

Open adobni opened this issue 1 year ago • 1 comments

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

adobni avatar May 23 '23 18:05 adobni