diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-05-16 16:36:48 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-05-16 16:36:48 +0300 |
commit | e8ceb3b5d429c0b58d60c68cc0d00582eb0fd25a (patch) | |
tree | cf55a84d2978c35fb0c28334114c898c04265346 /src/p18 | |
parent | a9a55d0d2da510f6094e321af5e374895d2c0250 (diff) |
add 'simple-json' format
Diffstat (limited to 'src/p18')
-rw-r--r-- | src/p18/response.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/p18/response.h b/src/p18/response.h index 7c40bdb..e10b72f 100644 --- a/src/p18/response.h +++ b/src/p18/response.h @@ -107,6 +107,14 @@ public: return j; } + + inline json toSimpleJSON() const { + json j; + std::visit([&j](const auto& elem) { + j = elem; + }, v_); + return j; + } }; |