@@ -584,6 +584,7 @@ where
584584/// [`RawDecoder`]: crate::raw::RawDecoder
585585/// [#3610]: https://github.com/apache/arrow-rs/issues/3610
586586#[ derive( Debug ) ]
587+ #[ deprecated( note = "Use RawDecoder instead" ) ]
587588pub struct Decoder {
588589 /// Explicit schema for the JSON file
589590 schema : SchemaRef ,
@@ -640,6 +641,7 @@ impl DecoderOptions {
640641 }
641642}
642643
644+ #[ allow( deprecated) ]
643645impl Decoder {
644646 /// Create a new JSON decoder from some value that implements an
645647 /// iterator over [`serde_json::Value`]s (aka implements the
@@ -1606,12 +1608,15 @@ fn flatten_json_string_values(values: &[Value]) -> Vec<Option<String>> {
16061608/// [`RawReader`]: crate::raw::RawReader
16071609/// [#3610]: https://github.com/apache/arrow-rs/issues/3610
16081610#[ derive( Debug ) ]
1611+ #[ deprecated( note = "Use RawReader instead" ) ]
1612+ #[ allow( deprecated) ]
16091613pub struct Reader < R : Read > {
16101614 reader : BufReader < R > ,
16111615 /// JSON value decoder
16121616 decoder : Decoder ,
16131617}
16141618
1619+ #[ allow( deprecated) ]
16151620impl < R : Read > Reader < R > {
16161621 /// Create a new JSON Reader from any value that implements the `Read` trait.
16171622 ///
@@ -1658,6 +1663,7 @@ impl<R: Read> Reader<R> {
16581663/// [#3610]: https://github.com/apache/arrow-rs/issues/3610
16591664///
16601665#[ derive( Debug , Default ) ]
1666+ #[ deprecated( note = "Use RawReaderBuilder instead" ) ]
16611667pub struct ReaderBuilder {
16621668 /// Optional schema for the JSON file
16631669 ///
@@ -1672,6 +1678,7 @@ pub struct ReaderBuilder {
16721678 options : DecoderOptions ,
16731679}
16741680
1681+ #[ allow( deprecated) ]
16751682impl ReaderBuilder {
16761683 /// Create a new builder for configuring JSON parsing options.
16771684 ///
@@ -1752,6 +1759,7 @@ impl ReaderBuilder {
17521759 }
17531760}
17541761
1762+ #[ allow( deprecated) ]
17551763impl < R : Read > Iterator for Reader < R > {
17561764 type Item = Result < RecordBatch , ArrowError > ;
17571765
@@ -1761,6 +1769,7 @@ impl<R: Read> Iterator for Reader<R> {
17611769}
17621770
17631771#[ cfg( test) ]
1772+ #[ allow( deprecated) ]
17641773mod tests {
17651774 use super :: * ;
17661775 use arrow_array:: cast:: {
0 commit comments