json: support tuple (#10010)

This commit is contained in:
Timothee Cour
2019-01-16 01:16:14 -08:00
committed by Andreas Rumpf
parent 384e517f09
commit b8454327c5
2 changed files with 20 additions and 1 deletions

View File

@@ -516,3 +516,7 @@ when true:
var w = u.to(MyDistRef)
doAssert v.name == "smith"
doAssert MyRef(w).name == "smith"
block test_tuple:
doAssert $(%* (a1: 10, a2: "foo")) == """{"a1":10,"a2":"foo"}"""
doAssert $(%* (10, "foo")) == """[10,"foo"]"""