From 68f96b225c4da758a87a90f5723025be7b2fafc1 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Thu, 25 Jul 2019 19:15:32 +0800 Subject: add binary mode --- xmake/core/base/string.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xmake/core/base/string.lua') diff --git a/xmake/core/base/string.lua b/xmake/core/base/string.lua index 30c374def..6579ef7de 100644 --- a/xmake/core/base/string.lua +++ b/xmake/core/base/string.lua @@ -203,13 +203,13 @@ end -- serialize to string from the given object -- --- @param deflate deflate empty characters +-- @param opt serialize options +-- e.g. { strip = true, binary = false, indent = true } -- -- @return string, errors -- -function string.serialize(object, deflate) - deflate = not not deflate - return serialize.save(object, { strip = deflate, indent = not deflate }) +function string.serialize(object, opt) + return serialize.save(object, opt) end -- deserialize string to object -- cgit v1.3.1