reuse jsffi in json module (#17165)

* remove unnecessary when statement

* remove outdated codes

* reuse jsffi

* move js json coverage
This commit is contained in:
flywind 2021-03-05 02:37:12 +08:00 • committed by GitHub
commit 81889fb84c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 23 deletions

View file

@ -1,4 +1,9 @@
import json
discard """
targets: "c js"
"""
import std/json
type
Foo = object

View file

@ -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:

View file

@ -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