diff --git a/docs/en/type-check.md b/docs/en/type-check.md index a4d9eade..4e1add89 100644 --- a/docs/en/type-check.md +++ b/docs/en/type-check.md @@ -58,7 +58,7 @@ serde.compat.SerdeError: Method __main__.Foo.__init__() parameter s=10 violates Type coercing automatically converts a value into the declared type during (de)serialization. If the value is incompatible e.g. value is "foo" and type is int, pyserde raises an `SerdeError`. ```python -@serde(type_check=Coerce) +@serde(type_check=coerce) class Foo s: str diff --git a/docs/ja/type-check.md b/docs/ja/type-check.md index a3b226bd..1b6bedc8 100644 --- a/docs/ja/type-check.md +++ b/docs/ja/type-check.md @@ -62,7 +62,7 @@ serde.compat.SerdeError: Method __main__.Foo.__init__() parameter s=10 violates 型強制 `coerce` は、(デ)シリアライズ中に値を宣言された型に自動的に変換します。 ```python -@serde(type_check=Coerce) +@serde(type_check=coerce) class Foo: s: str diff --git a/serde/json.py b/serde/json.py index 3d73be6b..a664e3ba 100644 --- a/serde/json.py +++ b/serde/json.py @@ -100,7 +100,7 @@ def from_json( Deserialize from JSON into the object. [orjson](https://github.com/ijl/orjson) will be used if installed. - `c` is a class obejct and `s` is JSON bytes or str. If you supply other keyword arguments, + `c` is a class object and `s` is JSON bytes or str. If you supply other keyword arguments, they will be passed in `loads` function. If you want to use another json package, you can subclass `JsonDeserializer` and implement diff --git a/serde/msgpack.py b/serde/msgpack.py index 6d8bcb52..de85ade9 100644 --- a/serde/msgpack.py +++ b/serde/msgpack.py @@ -116,7 +116,7 @@ def from_msgpack( """ Deserialize from MsgPack into the object. - `c` is a class obejct and `s` is MsgPack binary. If `ext_dict` option is specified, + `c` is a class object and `s` is MsgPack binary. If `ext_dict` option is specified, `c` is ignored and type is inferred from `msgpack.ExtType` If you supply other keyword arguments, they will be passed in `msgpack.unpackb` function. diff --git a/serde/toml.py b/serde/toml.py index c46508f7..cee4ac8e 100644 --- a/serde/toml.py +++ b/serde/toml.py @@ -84,7 +84,7 @@ def from_toml(c: Any, s: str, de: type[Deserializer[str]] = TomlDeserializer, ** """ Deserialize from TOML into the object. - `c` is a class obejct and `s` is TOML string. If you supply keyword arguments other than `de`, + `c` is a class object and `s` is TOML string. If you supply keyword arguments other than `de`, they will be passed in `toml.loads` function. If you want to use the other toml package, you can subclass `TomlDeserializer` and implement