Repository navigation
docs(json): lint @std/json docs - #4798
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4798 +/- ##
==========================================
- Coverage 92.32% 91.92% -0.41%
==========================================
Files 481 481
Lines 38747 38754 +7
Branches 5444 5409 -35
==========================================
- Hits 35775 35624 -151
- Misses 2917 3073 +156
- Partials 55 57 +2 ☔ View full report in Codecov by Sentry. |
|
FYI, we just updated the doc checker to check classes. Hence, the lint failure(s). |
| implements TransformStream<string, JsonValue> { | ||
| /** A writable stream of byte data. */ | ||
| // TODO(iuioiua): Investigate why this class is implemented differently to the other JSON streams. | ||
| /** |
There was a problem hiding this comment.
I went with this for now. I didn't bother with a proper example because this, as a public property, seems like a mistake/fault, and may get removed in the future.
There was a problem hiding this comment.
To my understanding readable and writable are necessary to be exposed for a TransformStream instance working as a TransformStream.
There was a problem hiding this comment.
I just meant how this implements TransformStream rather than extending it.
|
PTAL @kt3k |
| export class ConcatenatedJsonParseStream | ||
| implements TransformStream<string, JsonValue> { | ||
| /** A writable stream of byte data. */ | ||
| // TODO(iuioiua): Investigate why this class is implemented differently to the other JSON streams. |
There was a problem hiding this comment.
JSONParseStream supposes every chunk is valid JSON string which represents a single JSON object. ConcatenatedJsonParseStream handles stream of strings where each chunk can be incomplete fragments of JSON strings.
This difference exists because in NDJSON or JSONLines, each line contains single JSON object. So we can use TextLineStream to split them and pass the result to JSONParseStream. On the other hand, in Concatenated JSON, there's no explicit delimiter of JSONs. So the class needs to maintain the internal parsing state of JSONs
No description provided.