@@ -48,10 +48,61 @@ def read_json(
48
48
nrows : int | None = ...,
49
49
storage_options : StorageOptions = ...,
50
50
dtype_backend : DtypeBackend | NoDefault = ...,
51
+ engine : Literal ["ujson" ] = ...,
51
52
) -> JsonReader [Series ]: ...
52
53
@overload
53
54
def read_json (
54
- path_or_buf : FilePath | ReadBuffer [str ] | ReadBuffer [bytes ],
55
+ path_or_buf : FilePath | ReadBuffer [bytes ],
56
+ * ,
57
+ orient : JsonSeriesOrient | None = ...,
58
+ typ : Literal ["series" ],
59
+ dtype : bool | Mapping [HashableT , DtypeArg ] | None = ...,
60
+ convert_axes : bool | None = ...,
61
+ convert_dates : bool | list [str ] = ...,
62
+ keep_default_dates : bool = ...,
63
+ precise_float : bool = ...,
64
+ date_unit : TimeUnit | None = ...,
65
+ encoding : str | None = ...,
66
+ encoding_errors : (
67
+ Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
68
+ | None
69
+ ) = ...,
70
+ lines : Literal [True ],
71
+ chunksize : int ,
72
+ compression : CompressionOptions = ...,
73
+ nrows : int | None = ...,
74
+ storage_options : StorageOptions = ...,
75
+ dtype_backend : DtypeBackend | NoDefault = ...,
76
+ engine : Literal ["pyarrow" ],
77
+ ) -> JsonReader [Series ]: ...
78
+ @overload
79
+ def read_json (
80
+ path_or_buf : FilePath | ReadBuffer [bytes ],
81
+ * ,
82
+ orient : JsonFrameOrient | None = ...,
83
+ typ : Literal ["frame" ] = ...,
84
+ dtype : bool | Mapping [HashableT , DtypeArg ] | None = ...,
85
+ convert_axes : bool | None = ...,
86
+ convert_dates : bool | list [str ] = ...,
87
+ keep_default_dates : bool = ...,
88
+ precise_float : bool = ...,
89
+ date_unit : TimeUnit | None = ...,
90
+ encoding : str | None = ...,
91
+ encoding_errors : (
92
+ Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
93
+ | None
94
+ ) = ...,
95
+ lines : Literal [True ],
96
+ chunksize : int ,
97
+ compression : CompressionOptions = ...,
98
+ nrows : int | None = ...,
99
+ storage_options : StorageOptions = ...,
100
+ dtype_backend : DtypeBackend | NoDefault = ...,
101
+ engine : Literal ["ujson" ] = ...,
102
+ ) -> JsonReader [DataFrame ]: ...
103
+ @overload
104
+ def read_json (
105
+ path_or_buf : FilePath | ReadBuffer [bytes ],
55
106
* ,
56
107
orient : JsonFrameOrient | None = ...,
57
108
typ : Literal ["frame" ] = ...,
@@ -72,6 +123,7 @@ def read_json(
72
123
nrows : int | None = ...,
73
124
storage_options : StorageOptions = ...,
74
125
dtype_backend : DtypeBackend | NoDefault = ...,
126
+ engine : Literal ["pyarrow" ],
75
127
) -> JsonReader [DataFrame ]: ...
76
128
@overload
77
129
def read_json (
@@ -96,6 +148,32 @@ def read_json(
96
148
nrows : int | None = ...,
97
149
storage_options : StorageOptions = ...,
98
150
dtype_backend : DtypeBackend | NoDefault = ...,
151
+ engine : Literal ["ujson" ] = ...,
152
+ ) -> Series : ...
153
+ @overload
154
+ def read_json (
155
+ path_or_buf : FilePath | ReadBuffer [bytes ],
156
+ * ,
157
+ orient : JsonSeriesOrient | None = ...,
158
+ typ : Literal ["series" ],
159
+ dtype : bool | Mapping [HashableT , DtypeArg ] | None = ...,
160
+ convert_axes : bool | None = ...,
161
+ convert_dates : bool | list [str ] = ...,
162
+ keep_default_dates : bool = ...,
163
+ precise_float : bool = ...,
164
+ date_unit : TimeUnit | None = ...,
165
+ encoding : str | None = ...,
166
+ encoding_errors : (
167
+ Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
168
+ | None
169
+ ) = ...,
170
+ lines : Literal [True ],
171
+ chunksize : None = ...,
172
+ compression : CompressionOptions = ...,
173
+ nrows : int | None = ...,
174
+ storage_options : StorageOptions = ...,
175
+ dtype_backend : DtypeBackend | NoDefault = ...,
176
+ engine : Literal ["pyarrow" ],
99
177
) -> Series : ...
100
178
@overload
101
179
def read_json (
@@ -120,6 +198,32 @@ def read_json(
120
198
nrows : int | None = ...,
121
199
storage_options : StorageOptions = ...,
122
200
dtype_backend : DtypeBackend | NoDefault = ...,
201
+ engine : Literal ["ujson" ] = ...,
202
+ ) -> DataFrame : ...
203
+ @overload
204
+ def read_json (
205
+ path_or_buf : FilePath | ReadBuffer [bytes ],
206
+ * ,
207
+ orient : JsonFrameOrient | None = ...,
208
+ typ : Literal ["frame" ] = ...,
209
+ dtype : bool | Mapping [HashableT , DtypeArg ] | None = ...,
210
+ convert_axes : bool | None = ...,
211
+ convert_dates : bool | list [str ] = ...,
212
+ keep_default_dates : bool = ...,
213
+ precise_float : bool = ...,
214
+ date_unit : TimeUnit | None = ...,
215
+ encoding : str | None = ...,
216
+ encoding_errors : (
217
+ Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
218
+ | None
219
+ ) = ...,
220
+ lines : Literal [True ],
221
+ chunksize : None = ...,
222
+ compression : CompressionOptions = ...,
223
+ nrows : int | None = ...,
224
+ storage_options : StorageOptions = ...,
225
+ dtype_backend : DtypeBackend | NoDefault = ...,
226
+ engine : Literal ["pyarrow" ],
123
227
) -> DataFrame : ...
124
228
125
229
class JsonReader (abc .Iterator , Generic [NDFrameT ]):
0 commit comments