1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

json: encode_pretty (p. 2) + tests

This commit is contained in:
Alexander Medvednikov
2021-02-10 10:17:29 +01:00
parent f67e4ab57c
commit 035a163454
2 changed files with 21 additions and 14 deletions

View File

@@ -629,7 +629,7 @@ fn (mut g Gen) fn_call(node ast.CallExpr) {
is_json_encode := name == 'json.encode'
is_json_encode_pretty := name == 'json.encode_pretty'
is_json_decode := name == 'json.decode'
g.is_json_fn = is_json_encode || is_json_decode
g.is_json_fn = is_json_encode || is_json_encode_pretty || is_json_decode
mut json_type_str := ''
mut json_obj := ''
if g.is_json_fn {