mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
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.
This commit is contained in:
parent
49a01865b6
commit
f3414a43d8
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue