reuse jsffi in json module (#17165)
* remove unnecessary when statement * remove outdated codes * reuse jsffi * move js json coverage
This commit is contained in:
parent
e1cc3b83fb
commit
81889fb84c
4 changed files with 17 additions and 23 deletions
|
|
@ -1,4 +1,9 @@
|
|||
import json
|
||||
discard """
|
||||
targets: "c js"
|
||||
"""
|
||||
|
||||
|
||||
import std/json
|
||||
|
||||
type
|
||||
Foo = object
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
discard """
|
||||
targets: "c js"
|
||||
output:'''@["3", "2", "1"]
|
||||
'''
|
||||
"""
|
||||
#12928,10456
|
||||
import sequtils, algorithm, json
|
||||
import std/[sequtils, algorithm, json]
|
||||
|
||||
proc test() =
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
discard """
|
||||
targets: "c js"
|
||||
output: '''
|
||||
Original: (kind: P, pChildren: @[(kind: Text, textStr: "mychild"), (kind: Br)])
|
||||
jsonNode: {"kind":"P","pChildren":[{"kind":"Text","textStr":"mychild"},{"kind":"Br"}]}
|
||||
|
|
@ -6,7 +7,7 @@ Reversed: (kind: P, pChildren: @[(kind: Text, textStr: "mychild"), (kind: Br)])
|
|||
'''
|
||||
"""
|
||||
|
||||
import json
|
||||
import std/json
|
||||
|
||||
type
|
||||
ContentNodeKind* = enum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue