json_format: Add html_safe option

This commit is contained in:
Yorhel 2025-03-16 15:03:32 +01:00
parent 3fad7feec3
commit f8fe53cba9
3 changed files with 37 additions and 20 deletions

View file

@ -110,6 +110,7 @@ is json_format(
}
_
is json_format('<hello & world>', html_safe => 1), '"\u003chello \u0026 world\u003e"';
eval { json_format [[]], max_depth => 2 };
like $@, qr/max_depth exceeded while formatting JSON/;