Replies: 4 comments 4 replies
-
In my case I have response body that cannot fit into Node.js string, so I wanted to use the stream But it's not obvious at all how to make it parsing the whole stream to build the proper object, without using filter or so. Because my object is nested (can be 100+ levels), I cannot rely on array or object helpers presented in the Did I miss something to do "passthrough parsing" with It feels weird to me to reimplement https://github.com/davidfou/stream-json-object/blob/main/src/streamObjectTransformer.mjs to have the rebuild of the object. Would feel like I'm the only one doing this? |
Beta Was this translation helpful? Give feedback.
-
@davidfou If I understood correctly the code in the repo produces key-value pairs, which are more complex that the ones produced by
As to usefulness of such component: I try not to judge the usefulness because it is in the eye of the beholder. Typically I consider the following criteria:
Adding a component that uses a value path as a key fits the bill. If there is a request for that, I would add it. Thoughts? Comments? PS: If I am way off, please correct me so I re-evaluate my position. |
Beta Was this translation helpful? Give feedback.
-
@sneko What is "passthrough parsing"? Could you describe the functionality you need, or find missing? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
-
I started
So I implemented and published |
Beta Was this translation helpful? Give feedback.
-
Hello 👋
First of all, thanks for the hard work done on this library. Understanding how to use it properly can take time, though it is worth the investment.
With @justinberiot, we wanted to use it for a particular use case. In our context, the JSON is not large (the complete data can fit in memory without any issue). The complexity is much more on the fact it can take a lot of time to get it fully, and it can be a deeply nested structure.
Our objective is to have a frontend which builds incrementally whenever some information is available. We managed to do so thanks to your library. Our code is available on the repo davidfou/stream-json-object.
Code snippet
Here is what we wonder about:
Beta Was this translation helpful? Give feedback.
All reactions