-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #544 from yukinarit/add-japanese-translation
Add mdbook project for Japanese translation
- Loading branch information
Showing
16 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Summary | ||
|
||
- [Introduction](introduction.md) | ||
- [Getting Started](getting-started.md) | ||
- [Data Formats](data-formats.md) | ||
- [Types](types.md) | ||
- [Decorators](decorators.md) | ||
- [Class Attributes](class-attributes.md) | ||
- [Field Attributes](field-attributes.md) | ||
- [Union](union.md) | ||
- [Type Checking](type-check.md) | ||
- [Extension](extension.md) | ||
- [FAQ](faq.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[book] | ||
authors = ["yukinarit"] | ||
language = "ja" | ||
multilingual = true | ||
src = "./" | ||
title = "pyserde documentation" | ||
|
||
[output.html] | ||
git-repository-url = "https://github.com/yukinarit/pyserde" | ||
edit-url-template = "https://github.com/yukinarit/pyserde/edit/main/ja/{path}" |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Introduction | ||
|
||
`pyserde`は[dataclasses](https://docs.python.org/3/library/dataclasses.html)ベースのシンプルで強力なシリアライゼーションライブラリです。 | ||
|
||
クラスに`@serde`デコレータを付けるだけで、クラスを様々なデータフォーマットに変換可能になります。 | ||
|
||
```python | ||
@serde | ||
class Foo: | ||
i: int | ||
s: str | ||
f: float | ||
b: bool | ||
``` | ||
|
||
`Foo`クラスは以下のようにJSONにシリアライズ出来るようになります。 | ||
|
||
```python | ||
>>> to_json(Foo(i=10, s='foo', f=100.0, b=True)) | ||
'{"i":10,"s":"foo","f":100.0,"b":true}' | ||
``` | ||
|
||
また、JSONから`Foo`クラスにデシリアライズも出来るようになります。 | ||
```python | ||
>>> from_json(Foo, '{"i": 10, "s": "foo", "f": 100.0, "b": true}') | ||
Foo(i=10, s='foo', f=100.0, b=True) | ||
``` |
Empty file.
Empty file.
Empty file.