diff options
author | Kim Alvefur <zash@zash.se> | 2023-06-09 17:26:38 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-06-09 17:26:38 +0200 |
commit | f3414a43d85531ba9dd74c98600b4bd68c3978c4 (patch) | |
tree | 17b3734a6bf608104dbc4c905432afe96d6b65c2 /util | |
parent | 49a01865b62ac9e269ad28707bfe46f39576cce7 (diff) | |
download | prosody-f3414a43d85531ba9dd74c98600b4bd68c3978c4.tar.gz prosody-f3414a43d85531ba9dd74c98600b4bd68c3978c4.zip |
util.serialization: Add a "pretty" preset
This is the config I want 90% of the time when just showing data in the
console or so.
Diffstat (limited to 'util')
-rw-r--r-- | util/serialization.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/serialization.lua b/util/serialization.lua index 1f06ea54..ee4751e2 100644 --- a/util/serialization.lua +++ b/util/serialization.lua @@ -96,6 +96,10 @@ local function new(opt) opt.itemlast = opt.itemlast or ""; opt.equals = opt.equals or "="; opt.unquoted = true; + elseif opt.preset == "pretty" then + opt.fatal = false; + opt.freeze = true; + opt.unquoted = true; end local fallback = opt.fallback or opt.fatal == false and nonfatal_fallback or fatal_error; |