File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -555,8 +555,11 @@ where
555555 generate_schema ( field_types)
556556}
557557
558- /// JSON values to Arrow record batch decoder. Decoder's next_batch method takes a JSON Value
559- /// iterator as input and outputs Arrow record batch.
558+ /// JSON values to Arrow record batch decoder.
559+ ///
560+ /// A [`Decoder`] decodes arbitrary streams of [`serde_json::Value`]s and
561+ /// converts them to [`RecordBatch`]es. To decode JSON formatted files,
562+ /// see [`Reader`].
560563///
561564/// # Examples
562565/// ```
@@ -635,8 +638,9 @@ impl DecoderOptions {
635638}
636639
637640impl Decoder {
638- /// Create a new JSON decoder from any value that implements the `Iterator<Item=Result<Value>>`
639- /// trait.
641+ /// Create a new JSON decoder from some value that implements an
642+ /// iterator over [`serde_json::Value`]s (aka implements the
643+ /// `Iterator<Item=Result<Value>>` trait).
640644 pub fn new ( schema : SchemaRef , options : DecoderOptions ) -> Self {
641645 Self { schema, options }
642646 }
@@ -664,7 +668,10 @@ impl Decoder {
664668 }
665669 }
666670
667- /// Read the next batch of records
671+ /// Read the next batch of [`serde_json::Value`] records from the
672+ /// interator into a [`RecordBatch`].
673+ ///
674+ /// Returns `None` if the input iterator is exhausted.
668675 pub fn next_batch < I > ( & self , value_iter : & mut I ) -> Result < Option < RecordBatch > >
669676 where
670677 I : Iterator < Item = Result < Value > > ,
You can’t perform that action at this time.
0 commit comments