toml: fix iarna toml test

pull/13654/head
Ned Palacios 2022-03-04 15:17:18 +08:00
parent f1f46850aa
commit 8d0717122d
1 changed files with 3 additions and 2 deletions

View File

@ -321,11 +321,12 @@ fn to_iarna(value ast.Value, skip_value_map bool) string {
}
ast.Time {
mut json_text := json2.Any(value.text).json_str()
json_text = to_iarna_time(json_text)
// NB: Removes the quotes of the encoded JSON string - Ned
json_text = to_iarna_time(json_text[1..json_text.len - 1])
if skip_value_map {
return json_text
}
return '{ "type": "time", "value": $json_text }'
return '{ "type": "time", "value": "$json_text" }'
}
ast.Bool {
json_text := json2.Any(value.text.bool()).json_str()