Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/*.nimble') }}
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.2.4'
Expand Down
5 changes: 5 additions & 0 deletions docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ Via `nimble install`:
```text
nimble install json_serialization
```

## API documentation

This guide covers basic usage of `json_serialization` - for details, see the
[API reference](./api/).
5 changes: 4 additions & 1 deletion docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<!-- toc -->

This page provides an overview of the `json_serialization` API - for details, see the
[API reference](./api/).

## Parsing

### Common API
Expand Down Expand Up @@ -283,7 +286,7 @@ type
Seven = "Seven"
```

`nim-json-serialization` automatically detects the expected representation for each enum based on its declaration.
`json_serialization` automatically detects the expected representation for each enum based on its declaration.
- `Fruit` expects string literals.
- `Drawer` and `Number` expect numeric literals.
- `Mixed` (with both string and numeric values) is disallowed by default.
Expand Down
1 change: 1 addition & 0 deletions json_serialization.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ task mdbook, "Install mdbook (requires cargo)":

task docs, "Generate API documentation":
exec "mdbook build docs"
exec nimc & " doc " & "--git.url:https://github.com/status-im/nim-json-serialization --git.commit:master --outdir:docs/book/api --project json_serialization"