{"id":295185,"date":"2019-11-26T03:00:08","date_gmt":"2019-11-26T03:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=295185"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=295185","title":{"rendered":"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 libconfig \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/477454\/\">\n<h3 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u0418 \u0447\u0430\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0438\u0447 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445. \u041f\u043e\u043f\u0440\u043e\u0441\u0442\u0443, \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043e\u0441\u0435\u0434\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c. \u0422\u0430\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u043a\u0430\u043a deprecated, \u043b\u0438\u0431\u043e \u0432\u043e\u0432\u0441\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c.<\/p>\n<p>  <\/p>\n<h3 id=\"problema\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0441\u043c\u0435\u0441\u0438 json \u0438 yaml \u0438 \u043f\u0430\u0440\u0441\u0438\u043b\u0430\u0441\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/hyperrealm\/libconfig\">libconfig<\/a>. \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 yaml, \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043a\u0443\u0447\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0414\u0430 \u0438 \u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C, \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0445\u043e\u0440\u043e\u0448\u0430: \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430 \u0438 \u0431\u043e\u0433\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c (\u0432 \u043e\u0431\u0435\u0440\u0442\u043a\u0435 \u043d\u0430 C++ \u0432\u0441\u0435 \u043d\u0435 \u0442\u0430\u043a \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e).<\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u043c\u044b \u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0443\u0441\u043e\u0440\u0430 \u0443 \u043d\u0430\u0441 \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u043e\u0441\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445. \u0418 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0443 libconfig, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0444\u043e\u0440\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 github \u0438 \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0442\u0443 \u0447\u0430\u0441\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C++ (\u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b lookup \u0438 operator[]), \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u0430 visited \u0434\u043b\u044f \u043d\u043e\u0434\u044b. \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u0431\u044b \u043a \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u043f\u0430\u0442\u0447\u0443, \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0437\u0430\u0442\u044f\u043d\u0443\u043b\u043e\u0441\u044c \u0431\u044b. \u0418 \u0442\u043e\u0433\u0434\u0430 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043d\u0430 C++, \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044f \u044f\u0434\u0440\u043e libconfig.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">#include &lt;variti\/util\/config.hpp&gt;  #include &lt;iostream&gt; #include &lt;cassert&gt;  int main(int argc, char* argv[]) {   using namespace variti;   using namespace variti::util;   assert(argc = 2);   config conf(     [](const config_setting&amp; st) {       if (!st.visited())         std::cerr &lt;&lt; \"config not visited: \" &lt;&lt; st.path() &lt;&lt; \"\\n\";     });   conf.load(argv[1]);   auto root = conf.root();   root[\"module\"][\"name\"].to_string();   return 0; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">laptop :: work\/configpp\/example \u2039master*\u203a % cat config_example1.conf                                                                                                                                                                          version = \"1.0\"; module: {   name = \"module1\";   submodules = (     { name = \"submodule1\"; },     { name = \"submodule2\"; }   ); }; laptop :: work\/configpp\/example \u2039master*\u203a % .\/config-example1 config_example1.conf                                                                                                                                                            config not visited: root.module.submodules.0.name config not visited: root.module.submodules.1.name<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 module.name. \u041a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c module.submodules.0.name \u0438 module.submodules.1.name \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c. \u041e\u0431 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043b\u043e\u0433\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"obertyvanie\">\u041e\u0431\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0444\u043b\u0430\u0433\u0430 visited \u0438\u043b\u0438 \u0447\u0435\u0433\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043d\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 libconfig? \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0446\u0435\u043f\u0438\u0442\u044c \u043a \u043d\u043e\u0434\u0435 config_setting_t \u0445\u0443\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 config_setting_set_hook \u0438 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e config_setting_get_hook.<\/p>\n<p>  <\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u044d\u0442\u0443 \u0445\u0443\u043a\u0443 \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">struct config_setting_hook {   bool visited{false}; };<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 libconfig \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b: config_t \u0438 config_setting_t. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443 \u0432 \u0446\u0435\u043b\u043e\u043c \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0440\u0443\u0442\u043e\u0432\u0443\u044e \u043d\u043e\u0434\u0443 config_setting_t, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u043d\u043e\u0434\u0430\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043d\u043e\u0434\u044b.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0435\u0440\u043d\u0435\u043c \u043e\u0431\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u2014 \u0445\u044d\u043d\u0434\u043b\u044b.<\/p>\n<p>  <\/p>\n<p>\u0425\u044d\u043d\u0434\u043b \u0432\u043e\u043a\u0440\u0443\u0433 config_t:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">using config_notify = std::function&lt;void(const config_setting&amp;)&gt;;  struct config   : boost::noncopyable {   config(config_notify n = nullptr);  ~config();    void load(const std::string&amp; filename);    config_setting root() const;    config_notify n;   config_t* h; };<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 config \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0431\u0445\u043e\u0434\u0430 \u0432\u0441\u0435\u0445 \u043a\u0440\u0430\u0439\u043d\u0438\u0445 \u043d\u043e\u0434. \u041a\u0430\u043a \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u2014 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<p>  <\/p>\n<p>\u0425\u044d\u043d\u0434\u043b \u0432\u043e\u043a\u0440\u0443\u0433 config_setting_t:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">struct config_setting   : boost::noncopyable {   config_setting(config_setting_t* h, bool visit = false);  ~config_setting();    bool to_bool() const;   std::int32_t to_int32() const;   std::int64_t to_int64() const;   double to_double() const;   std::string to_string() const;    bool is_bool() const;   bool is_int32() const;   bool is_int64() const;   bool is_double() const;   bool is_string() const;   bool is_group() const;   bool is_array() const;   bool is_list() const;   bool is_scalar() const;   bool is_root() const;    std::string path() const;    std::size_t size() const;    bool exists(const std::string&amp; name) const;    config_setting parent() const;    config_setting lookup(const std::string&amp; name, bool visit = false) const;   config_setting lookup(std::size_t indx, bool visit = false) const;    config_setting operator[](const std::string&amp; name) const;   config_setting operator[](std::size_t indx) const;    std::string filename() const;   std::size_t fileline() const;    bool visited() const;    config_setting_t* h; };<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 lookup. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u043b\u0430\u0433 visited \u043d\u043e\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c visit, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0432\u0435\u043d false. \u0412\u044b \u0432\u043f\u0440\u0430\u0432\u0435 \u0441\u0430\u043c\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u043e\u0434\u0430\u043c \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 operator[], \u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445 \u043c\u0435\u0442\u043e\u0434 lookup \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 visit, \u0440\u0430\u0432\u043d\u044b\u043c true. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u043e\u0434\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u0442\u0435 operator[], \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a visited. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a visited \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u0430 \u0432\u0441\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u043d\u043e\u0434 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0438 \u0434\u043e \u0440\u0443\u0442\u043e\u0432\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u043a\u0430\u0436\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0435\u0435 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 config:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">config::config(config_notify n)   : n(n) {   h = (config_t*)malloc(sizeof(config_t));   config_init(h);   config_set_destructor(h,     [](void* p) {       delete reinterpret_cast&lt;config_setting_hook*&gt;(p);     }); }  config::~config() {   if (n)     for_each(root(), n);   config_destroy(h);   free(h); }  void config::load(const std::string&amp; filename) {   if (!config_read_file(h, filename.c_str()))     throw std::runtime_error(std::string(\"config read file error: \") + filename); }  config_setting config::root() const {   return config_setting(config_root_setting(h)); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f config_setting:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">config_setting::config_setting(config_setting_t* h, bool visit)   : h(h) {   assert(h);   if (!config_setting_get_hook(h))     hook(h, new config_setting_hook())   if (visit)     visit_up(h); }  config_setting::~config_setting() {   h = nullptr; }  std::size_t config_setting::size() const {   return config_setting_length(h); }  config_setting config_setting::parent() const {   return config_setting(config_setting_parent(h)); }  bool config_setting::exists(const std::string&amp; name) const {   if (!is_group())     return false;   return config_setting_get_member(h, name.c_str()); }  config_setting config_setting::lookup(const std::string&amp; name, bool visit) const {   assert(is_group());   auto p = config_setting_get_member(h, name.c_str());   if (!p)     throw_not_found(*this);   return config_setting(p, visit); }  config_setting config_setting::lookup(std::size_t indx, bool visit) const {   assert(is_group() || is_array() || is_list());   auto p = config_setting_get_elem(h, indx);   if (!p)     throw_not_found(*this);   return config_setting(p, visit); }  config_setting config_setting::operator[](const std::string&amp; name) const {   return lookup(name, true); }  config_setting config_setting::operator[](std::size_t indx) const {   return lookup(indx, true); }  bool config_setting::visited() const {   return boost::algorithm::starts_with(path(), \"root\") ||          boost::algorithm::starts_with(path(), \"root.version\") ||          hook(h)-&gt;visited; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0445\u044d\u043b\u043f\u0435\u0440\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0445\u0443\u043a\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void hook(config_setting_t* h, config_setting_hook* k) {   config_setting_set_hook(h, k); }  config_setting_hook* hook(config_setting_t* h) {   return reinterpret_cast&lt;config_setting_hook*&gt;(config_setting_get_hook(h)); }  void visit_up(config_setting_t* h) {   for (; !config_setting_is_root(h) &amp;&amp; !hook(h)-&gt;visited; h = config_setting_parent(h))     hook(h)-&gt;visited = true; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0445\u044d\u043b\u043f\u0435\u0440 \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u043a\u0440\u0430\u0439\u043d\u0438\u0445 \u043d\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">template &lt;typename F&gt; void for_each(const config_setting&amp; st, F f) {   if (st.size())     for (std::size_t i = 0; i &lt; st.size(); ++i)       for_each(st.lookup(i), f);   else     f(st); }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"vyvod\">\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439, \u043d\u0430 \u043d\u0430\u0448 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u043e\u0434. \u041d\u043e \u043c\u044b \u043d\u0435 \u0437\u0430\u0431\u0440\u043e\u0441\u0438\u043b\u0438 \u043c\u044b\u0441\u043b\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u043d\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 libconfig, \u0430, \u0442\u043e\u0447\u043d\u0435\u0435, \u0432 \u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 C++. \u0421\u0435\u0439\u0447\u0430\u0441 \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442, \u043d\u0443 \u0430 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0438 \u0447\u0438\u0441\u0442\u0438\u043c \u043d\u0430\u0448\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u043e\u0442 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<p>  <\/p>\n<h3 id=\"prilozhenie\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/variti-com\/configpp\">\u0442\u0443\u0442<\/a>!<\/p>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/477454\/\"> https:\/\/habr.com\/ru\/post\/477454\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/477454\/\">\n<h3 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u0418 \u0447\u0430\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0438\u0447 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445. \u041f\u043e\u043f\u0440\u043e\u0441\u0442\u0443, \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043e\u0441\u0435\u0434\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c. \u0422\u0430\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u043a\u0430\u043a deprecated, \u043b\u0438\u0431\u043e \u0432\u043e\u0432\u0441\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c.<\/p>\n<p>  <\/p>\n<h3 id=\"problema\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0441\u043c\u0435\u0441\u0438 json \u0438 yaml \u0438 \u043f\u0430\u0440\u0441\u0438\u043b\u0430\u0441\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/hyperrealm\/libconfig\">libconfig<\/a>. \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 yaml, \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043a\u0443\u0447\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0414\u0430 \u0438 \u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C, \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0445\u043e\u0440\u043e\u0448\u0430: \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430 \u0438 \u0431\u043e\u0433\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c (\u0432 \u043e\u0431\u0435\u0440\u0442\u043a\u0435 \u043d\u0430 C++ \u0432\u0441\u0435 \u043d\u0435 \u0442\u0430\u043a \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e).<\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u043c\u044b \u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0443\u0441\u043e\u0440\u0430 \u0443 \u043d\u0430\u0441 \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u043e\u0441\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445. \u0418 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0443 libconfig, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0444\u043e\u0440\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 github \u0438 \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0442\u0443 \u0447\u0430\u0441\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C++ (\u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b lookup \u0438 operator[]), \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u0430 visited \u0434\u043b\u044f \u043d\u043e\u0434\u044b. \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u0431\u044b \u043a \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u043f\u0430\u0442\u0447\u0443, \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0437\u0430\u0442\u044f\u043d\u0443\u043b\u043e\u0441\u044c \u0431\u044b. \u0418 \u0442\u043e\u0433\u0434\u0430 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043d\u0430 C++, \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044f \u044f\u0434\u0440\u043e libconfig.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-295185","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=295185"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295185\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}