Skip to content

Commit

Permalink
Merge pull request treeform#64 from treeform/dev
Browse files Browse the repository at this point in the history
test Nim 1.4.0 support
  • Loading branch information
treeform authored Feb 9, 2023
2 parents cd02b16 + b351f6c commit ea811be
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
nim-version: ['1.4.0', '1.4.x', 'stable']

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ matrix.nim-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: nimble test -y
- run: nimble test --gc:orc -y
- run: nim js -r tests/all.nim
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ type Entry = object

## Full support for raw-json.

Sometimes you don't need to parse the json, but just send it or store it in the database. You can speed this up by using `RawJson` type. What it does is prevents full parsing of that json tree and instead returns it is a `RawJson` (`disticnt string`) type. You can then do anything you want with that. Store it in a database or pass it along to some other API. Or maybe parse it later again with jsony.
Sometimes you don't need to parse the json, but just send it or store it in the database. You can speed this up by using `RawJson` type. What it does is prevents full parsing of that json tree and instead returns it is a `RawJson` (`distinct string`) type. You can then do anything you want with that. Store it in a database or pass it along to some other API. Or maybe parse it later again with jsony.

```nim
import jsony
Expand Down
2 changes: 1 addition & 1 deletion jsony.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.1.4"
version = "1.1.5"
author = "Andre von Houck"
description = "A loose direct to object json parser with hooks."
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ var
doAssert a.toJson() == """123"""
doAssert b.toJson() == """null"""

doAssert $("""1""".fromJson(Option[int])) == "some(1)"
doAssert $("""null""".fromJson(Option[int])) == "none(int)"
doAssert """1""".fromJson(Option[int]) == some(1)
doAssert """null""".fromJson(Option[int]) == none(int)

proc check[T](v: T) =
var v2 = some(v)
Expand Down

0 comments on commit ea811be

Please sign in to comment.