datacontract-cli icon indicating copy to clipboard operation
datacontract-cli copied to clipboard

Adding json format for import

Open mathispernias opened this issue 6 months ago • 2 comments

  • [x] Tests pass
  • [x] ruff format
  • [x] README.md updated (if relevant)
  • [x] CHANGELOG.md entry added

mathispernias avatar May 20 '25 18:05 mathispernias

This implementation looks like it supports JSON files with single structures. In practive, we often see JSON files with new line delimited entries that contain 1000 messages.

Example: https://github.com/datacontract/datacontract-cli/blob/main/tests/fixtures/s3-json/data/inventory/year%3D2022/month%3D04/day%3D20/hour%3D00/inventory%2B0%2B0001327496.json

Can you please make sure that the JSON importer also supports JSON documents with multiple entries?

jochenchrist avatar May 20 '25 19:05 jochenchrist

The JSON importer can now also takes NDJSON (Newline-delimited JSON).

mathispernias avatar May 22 '25 13:05 mathispernias

I like it. Can you make the test jsons a little smaller? And make sure the test jsons and their imported contracts have the same file prefix.

simonharrer avatar May 28 '25 09:05 simonharrer

I updated the JSON tests to include three cases—simple JSON, complex JSON, and NDJSON— I also changed the file prefix.

mathispernias avatar May 28 '25 18:05 mathispernias

thanks for the contribution!

simonharrer avatar Jun 11 '25 15:06 simonharrer