Fuzzing setup and fixes (#755)
* encode: fix localdate formatting * encode: fix empty key marshaling * encode: fix invalid quotation of time.Time * encode: ensure control chars are escaped * decode: always use UTC for zero tz * encode: check for invalid characters in keys * encode: always construct map for empty array tables * fuzz: add go 1.18 fuzz test * encode: handle NaNs * encode: allow new lines in quoted keys * encode: never emit table inside array * encode: don't capitalize inf
This commit is contained in:
+2
-2
@@ -971,7 +971,7 @@ B = "data"`,
|
||||
"Name": "Hammer",
|
||||
"Sku": int64(738594937),
|
||||
},
|
||||
map[string]interface{}(nil),
|
||||
map[string]interface{}{},
|
||||
map[string]interface{}{
|
||||
"Name": "Nail",
|
||||
"Sku": int64(284758393),
|
||||
@@ -1505,7 +1505,7 @@ B = "data"`,
|
||||
target: &map[string]interface{}{},
|
||||
expected: &map[string]interface{}{
|
||||
"products": []interface{}{
|
||||
map[string]interface{}(nil),
|
||||
map[string]interface{}{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user