jsonexport icon indicating copy to clipboard operation
jsonexport copied to clipboard

Add support for objectMode streaming

Open air2 opened this issue 5 years ago • 2 comments

Status

READY

Description

This commit supports streaming objects, instead of stringified JSON, by adding objectMode to the options and implementing it in the stream.js

Related PRs

List related PRs against other branches:

branch PR
other_pr_production link
other_pr_master link

Todos

  • [ ] Tests
  • [ ] Documentation

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.

git pull --prune
git checkout <feature_branch>
bundle; script/server

Impacted Areas in Application

List general components of the application that this PR will affect:

air2 avatar Sep 21 '20 05:09 air2

I have reviewed some of the code here. I haven’t had too much experience in our jsonexport in regards to streaming. However, what I think I am reading here sounds amazing.

@air2 could you please elaborate how this works, if I understand correctly we can now stream, with your code, in chunks of valid json-to-object... If you could elaborate please. I am a contributor and could help along if I also better understood a better picture here please and thank you

AckerApple avatar Oct 22 '20 01:10 AckerApple

Also it would help me if you were able to provide a unit test in any fashion to accompany this PR

AckerApple avatar Oct 22 '20 01:10 AckerApple