@@ -22,6 +22,7 @@ from pandas._typing import (
22
22
NDFrameT ,
23
23
ReadBuffer ,
24
24
StorageOptions ,
25
+ TimeUnit ,
25
26
)
26
27
27
28
@overload
@@ -35,7 +36,7 @@ def read_json(
35
36
convert_dates : bool | list [str ] = ...,
36
37
keep_default_dates : bool = ...,
37
38
precise_float : bool = ...,
38
- date_unit : Literal [ "s" , "ms" , "us" , "ns" ] | None = ...,
39
+ date_unit : TimeUnit | None = ...,
39
40
encoding : str | None = ...,
40
41
encoding_errors : (
41
42
Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
@@ -59,7 +60,7 @@ def read_json(
59
60
convert_dates : bool | list [str ] = ...,
60
61
keep_default_dates : bool = ...,
61
62
precise_float : bool = ...,
62
- date_unit : Literal [ "s" , "ms" , "us" , "ns" ] | None = ...,
63
+ date_unit : TimeUnit | None = ...,
63
64
encoding : str | None = ...,
64
65
encoding_errors : (
65
66
Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
@@ -83,7 +84,7 @@ def read_json(
83
84
convert_dates : bool | list [str ] = ...,
84
85
keep_default_dates : bool = ...,
85
86
precise_float : bool = ...,
86
- date_unit : Literal [ "s" , "ms" , "us" , "ns" ] | None = ...,
87
+ date_unit : TimeUnit | None = ...,
87
88
encoding : str | None = ...,
88
89
encoding_errors : (
89
90
Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
@@ -107,7 +108,7 @@ def read_json(
107
108
convert_dates : bool | list [str ] = ...,
108
109
keep_default_dates : bool = ...,
109
110
precise_float : bool = ...,
110
- date_unit : Literal [ "s" , "ms" , "us" , "ns" ] | None = ...,
111
+ date_unit : TimeUnit | None = ...,
111
112
encoding : str | None = ...,
112
113
encoding_errors : (
113
114
Literal ["strict" , "ignore" , "replace" , "backslashreplace" , "surrogateescape" ]
0 commit comments