mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
reuse jsffi in json module (#17165)
* remove unnecessary when statement * remove outdated codes * reuse jsffi * move js json coverage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user