Skip to content

Commit

Permalink
add since
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jun 6, 2020
1 parent b479f4b commit ff1295a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/pure/json.nim
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ runnableExamples:
import
hashes, tables, strtabs, strutils, lexbase, streams, macros, parsejson,
options
import std/private/since

export
tables.`$`
Expand Down Expand Up @@ -1290,7 +1291,7 @@ when false:

proc isNamedTuple(T: typedesc): bool {.magic: "TypeTrait".}

proc toJson*[T](a: T): JsonNode =
proc toJson*[T](a: T): JsonNode {.since: (1,3,5).} =
## like `%` but allows custom serialization hook if `serialize(a: T)` is in scope
when compiles(serialize(a)):
proc funAdd(t: JsonNode, key: string, val: string) = t[key] = %val
Expand Down
2 changes: 1 addition & 1 deletion testament/important_packages.nim
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pkg1 "illwill", false, "nimble examples"
pkg1 "inim", true # pending https://github.com/inim-repl/INim/issues/74
pkg1 "itertools", false, "nim doc src/itertools.nim"
pkg1 "iterutils"
pkg1 "jstin"
# pkg1 "jstin" # toJson clashes, jstin needs to be patched (eg: import except toJson)
pkg1 "karax", false, "nim c -r tests/tester.nim"
pkg1 "kdtree", false, "nimble test", "https://github.com/jblindsay/kdtree"
pkg1 "loopfusion"
Expand Down

0 comments on commit ff1295a

Please sign in to comment.