<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 22 Dec 2020 at 21:21, Sean Farrow via Boost-users <<a href="mailto:boost-users@lists.boost.org">boost-users@lists.boost.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"> <div lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"> <div class="m_-1510509588478736990WordSection1"> <p class="MsoNormal">Hi,<u></u><u></u></p> <p class="MsoNormal"><u></u> <u></u></p> <p class="MsoNormal">Are there any samples of using boost.json to deserialize boost.beast responses?</p></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Not in the documentation of the two libraries as they are treated as separate self-contained concerns.</div><div dir="auto"><br></div><div dir="auto">However it’s quite trivial.</div><div dir="auto"><br></div><div dir="auto">The data() member of a flat_buffer contains a pointer and a size. Cast the pointer to const char * and use it and the size to construct a json::string_view.</div><div dir="auto">From there you can call json::parse to get your json::value.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><div class="m_-1510509588478736990WordSection1"><p class="MsoNormal" dir="auto"><u></u><u></u></p> <p class="MsoNormal">Thanks,<u></u><u></u></p> <p class="MsoNormal">Sean.<u></u><u></u></p> </div> </div> _______________________________________________<br> Boost-users mailing list<br> <a href="mailto:Boost-users@lists.boost.org" target="_blank">Boost-users@lists.boost.org</a><br> <a href="https://lists.boost.org/mailman/listinfo.cgi/boost-users" rel="noreferrer" target="_blank">https://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br> </blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Richard Hodges<div><a href="mailto:hodges.r@gmail.com" target="_blank">hodges.r@gmail.com</a></div><div>office: +442032898513</div><div>home: +376841522</div><div>mobile: +376380212</div><div><br></div></div></div></div></div>