<commit_before>#ifndef QUERY_HPP_INCLUDED
#define QUERY_HPP_INCLUDED

#ifndef Q_MOC_RUN // A Qt workaround, for those of you who use Qt
#   include "SimpleJSON/parse/jsd.h"
#   include "SimpleJSON/parse/jsd_convenience.h"
#   include "SimpleJSON/parse/jsd_optional.h"
#   include "SimpleJSON/stringify/jss.h"
#   include "SimpleJSON/stringify/jss_optional.h"
#   include "SimpleJSON/stringify/jss_fusion_adapted_struct.h"
#endif

#include <string>
#include <vector>
#include <map>
#include <sstream>

namespace WikiClient
{
    struct Query;
    struct Page;
    struct Revision;

    struct Query : public JSON::Stringifiable <Query>
                 , public JSON::Parsable <Query>
    {
        std::map <std::string, Page> pages;
    };

    struct QueryBatch : public JSON::Stringifiable <QueryBatch>
                      , public JSON::Parsable <QueryBatch>
    {
        std::string batchcomplete;
        boost::optional <Query> query;
    };

    struct Revision : public JSON::Stringifiable <Revision>
                    , public JSON::Parsable <Revision>
    {
        std::string contentformat;
        std::string contentmodel;
        JSON::rename <std::string, SHORT_STRING("*")> content;
    };

    struct Page : public JSON::Stringifiable <Page>
                , public JSON::Parsable <Page>
    {
        uint64_t pageid;
        uint64_t ns;
        std::string title;
        std::vector <Revision> revisions;
    };
}

BOOST_FUSION_ADAPT_STRUCT(WikiClient::QueryBatch, batchcomplete, query)
BOOST_FUSION_ADAPT_STRUCT(WikiClient::Query, pages)
BOOST_FUSION_ADAPT_STRUCT(WikiClient::Revision, contentformat, contentmodel, content)
BOOST_FUSION_ADAPT_STRUCT(WikiClient::Page, pageid, ns, title, revisions)

#endif // QUERY_HPP_INCLUDED<commit_msg>Fixed problem with changed SimpleJSON rename utility. Fixed for mplex compatibility (in one project).<commit_after>#ifndef QUERY_HPP_INCLUDED
#define QUERY_HPP_INCLUDED

#ifndef Q_MOC_RUN // A Qt workaround, for those of you who use Qt
#   include "SimpleJSON/parse/jsd.h"
#   include "SimpleJSON/parse/jsd_convenience.h"
#   include "SimpleJSON/parse/jsd_optional.h"
#   include "SimpleJSON/stringify/jss.h"
#   include "SimpleJSON/stringify/jss_optional.h"
#   include "SimpleJSON/stringify/jss_fusion_adapted_struct.h"
#   include "SimpleJSON/utility/rename.h"
#endif

#include <string>
#include <vector>
#include <map>
#include <sstream>

namespace WikiClient
{
    struct Query;
    struct Page;
    struct Revision;

    struct Query : public JSON::Stringifiable <Query>
                 , public JSON::Parsable <Query>
    {
        std::map <std::string, Page> pages;
    };

    struct QueryBatch : public JSON::Stringifiable <QueryBatch>
                      , public JSON::Parsable <QueryBatch>
    {
        std::string batchcomplete;
        boost::optional <Query> query;
    };

    struct Revision : public JSON::Stringifiable <Revision>
                    , public JSON::Parsable <Revision>
    {
        std::string contentformat;
        std::string contentmodel;
        JSON::rename <std::string, SJSON_SHORT_STRING("*")> content;
    };

    struct Page : public JSON::Stringifiable <Page>
                , public JSON::Parsable <Page>
    {
        uint64_t pageid;
        uint64_t ns;
        std::string title;
        std::vector <Revision> revisions;
    };
}

BOOST_FUSION_ADAPT_STRUCT(WikiClient::QueryBatch, batchcomplete, query)
BOOST_FUSION_ADAPT_STRUCT(WikiClient::Query, pages)
BOOST_FUSION_ADAPT_STRUCT(WikiClient::Revision, contentformat, contentmodel, content)
BOOST_FUSION_ADAPT_STRUCT(WikiClient::Page, pageid, ns, title, revisions)


#endif // QUERY_HPP_INCLUDED
{'fraction_non_alphanumeric': 0.105578231292517, 'fraction_numerical': 0.0021768707482993197, 'mean_word_length': 3.434258142340169, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3657149', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1148, 'n_words': 252}