From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Roman Khabibov <roman.habibov1@yandex.ru>,
Kirill Yukhin <kyukhin@tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v3] json: add options to json.encode()
Date: Mon, 10 Sep 2018 16:12:20 +0300 [thread overview]
Message-ID: <20180910131220.sdbvfye7h2svl4z6@tkn_work_nb> (raw)
In-Reply-To: <31669101536536574@iva1-77b79d681cd9.qloud-c.yandex.net>
The patch looks good for me.
One minor comment is below.
Kirill, can you look into the patch? Two review iterations were passed.
branch: romankhabibov/gh-2888-options-encode
issue: https://github.com/tarantool/tarantool/issues/2888
WBR, Alexander Turenko.
On Mon, Sep 10, 2018 at 02:42:54AM +0300, roman.habibov1@yandex.ru wrote:
> Hi! Thanks for review.
>
> --
> + -- gh-2888: Check the possibility of using options in encode()/decode().
> + --
> + local orig_encode_max_depth = serializer.cfg.encode_max_depth
> + local sub = {a = 1, { b = {c = 1, d = {e = 1}}}}
> + serializer.cfg({encode_max_depth = 1})
> + test:ok(serializer.encode(sub) == '{"1":null,"a":1}',
> + 'depth of encoding is 1 with .cfg')
> + serializer.cfg({encode_max_depth = orig_encode_max_depth})
> + test:ok(serializer.encode(sub, {encode_max_depth = 1}) == '{"1":null,"a":1}',
> + 'depth of encoding is 1 with .encode')
test:ok(got == exp, msg) can be replaced with test:is(got, exp, msg) and
will show what was expected and what was got in case of fail.
next prev parent reply other threads:[~2018-09-10 13:12 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1531010828.git.roman.habibov1@yandex.ru>
2018-07-08 0:57 ` [tarantool-patches] [PATCH] json: added " Roman Khabibov
2018-07-09 10:33 ` [tarantool-patches] " Vladislav Shpilevoy
2018-07-17 18:19 ` roman.habibov1
2018-07-19 10:18 ` Vladislav Shpilevoy
2018-07-23 22:38 ` [tarantool-patches] Re: [PATCH v3] json: add " roman.habibov1
2018-07-25 21:35 ` Vladislav Shpilevoy
2018-07-26 9:40 ` roman.habibov1
2018-07-26 10:07 ` Vladislav Shpilevoy
2018-07-26 12:29 ` roman.habibov1
2018-07-26 12:33 ` Vladislav Shpilevoy
2018-07-26 13:19 ` roman.habibov1
2018-07-26 21:45 ` Vladislav Shpilevoy
2018-07-31 15:29 ` roman.habibov1
2018-08-01 10:37 ` Vladislav Shpilevoy
2018-08-01 20:41 ` roman.habibov1
2018-08-02 12:59 ` Vladislav Shpilevoy
2018-08-07 21:52 ` roman.habibov1
2018-08-07 21:53 ` roman.habibov1
2018-08-08 19:07 ` Vladislav Shpilevoy
2018-08-13 23:14 ` roman.habibov1
2018-08-14 22:29 ` Vladislav Shpilevoy
2018-08-23 21:03 ` Alexander Turenko
2018-09-09 15:28 ` Alexander Turenko
2018-09-09 23:42 ` roman.habibov1
2018-09-10 13:12 ` Alexander Turenko [this message]
2018-08-08 19:08 ` Vladislav Shpilevoy
2018-07-11 7:57 ` [tarantool-patches] Re: [PATCH] json: added " Kirill Yukhin
2018-07-19 10:24 ` Vladislav Shpilevoy
2018-09-13 15:23 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180910131220.sdbvfye7h2svl4z6@tkn_work_nb \
--to=alexander.turenko@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=roman.habibov1@yandex.ru \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='[tarantool-patches] Re: [PATCH v3] json: add options to json.encode()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox