Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
gabbhack committed Dec 15, 2020
1 parent a03ce3e commit 1dbdf74
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
path-ignore:
- 'README.md'
release:
types: [published]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
path-ignore:
- 'README.rst'
- 'README.md'
release:
types: [published]

Expand Down
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Deser

**Deser is a serialization and deserialization library for Nim**

[Deser documentation](https://deser.nim.town/)

## Installation

```
nimble install deser
```

or

```nim
requires "nim >= 1.4.2, deser >= 0.1.3"
```

## Usage

```nim
import macros, options, times
import deser, deser_json
type
Foo {.skipSerializeIf(isNone), renameAll(rkSnakeCase).} = object
id: int
someOption: Option[int]
date {.serializeWith(toUnix), deserializeWith(fromUnix).}: Time
const js = """
{
"id": 123,
"some_option": 321,
"date": 1214092800
}
"""
var f = js.parse().to(Foo)
f.someOption = none(int)
assert f.dumps() == """{"id":123,"date":1214092800}"""
```
9 changes: 0 additions & 9 deletions README.rst

This file was deleted.

0 comments on commit 1dbdf74

Please sign in to comment.