added enum indexed array support to json (#16807)

* added enum indexed array support to json

* Added json test

* Removed when statement for enum indexed arrays
This commit is contained in:
Jason Beetham
2021-01-25 16:55:49 -07:00
committed by GitHub
parent 25745ad195
commit dde096ffde
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
import json
type Test = enum
one, two, three, four, five
let a = [
one: 300,
two: 20,
three: 10,
four: 0,
five: -10
]
doAssert (%* a).to(a.typeof) == a