<commit_before>#include "json.hpp"

#include <rapidjson/document.h>

namespace WAMPP {

namespace JSON {

Node::Node(const rapidjson::Value &val) {
    switch(val.GetType()) {
        case rapidjson::kNullType:
        {
            data = Null();
            break;
        }
        case rapidjson::kFalseType:
        {
            data = false;
            break;
        }
        case rapidjson::kTrueType:
        {
            data = true;
            break;
        }
        case rapidjson::kObjectType:
        {
            data = Object();
            rapidjson::Value::ConstMemberIterator itr;
            for (itr = val.MemberBegin(); itr != val.MemberEnd(); ++itr) {
                NodePtr pChild(new Node(itr->value));
                boost::get<Object>(data).insert(
                    std::make_pair(itr->name.GetString(), pChild));
            }
            break;
        }
        case rapidjson::kArrayType:
        {
            data = Array();
            rapidjson::Value::ConstValueIterator itr;
            for (itr = val.Begin(); itr != val.End(); ++itr) {
                NodePtr pChild(new Node(*itr));
                boost::get<Array>(data).push_back(pChild);
            }
            break;
        }
        case rapidjson::kStringType:
        {
            data = std::string(val.GetString());
            LOGGER_WRITE(Logger::DEBUG,val.GetString());
            break;
        }
        case rapidjson::kNumberType:<commit_msg>json.cpp: Remove debug message<commit_after>#include "json.hpp"

#include <rapidjson/document.h>

namespace WAMPP {

namespace JSON {

Node::Node(const rapidjson::Value &val) {
    switch(val.GetType()) {
        case rapidjson::kNullType:
        {
            data = Null();
            break;
        }
        case rapidjson::kFalseType:
        {
            data = false;
            break;
        }
        case rapidjson::kTrueType:
        {
            data = true;
            break;
        }
        case rapidjson::kObjectType:
        {
            data = Object();
            rapidjson::Value::ConstMemberIterator itr;
            for (itr = val.MemberBegin(); itr != val.MemberEnd(); ++itr) {
                NodePtr pChild(new Node(itr->value));
                boost::get<Object>(data).insert(
                    std::make_pair(itr->name.GetString(), pChild));
            }
            break;
        }
        case rapidjson::kArrayType:
        {
            data = Array();
            rapidjson::Value::ConstValueIterator itr;
            for (itr = val.Begin(); itr != val.End(); ++itr) {
                NodePtr pChild(new Node(*itr));
                boost::get<Array>(data).push_back(pChild);
            }
            break;
        }
        case rapidjson::kStringType:
        {
            data = std::string(val.GetString());
            break;
        }
        case rapidjson::kNumberType:
{'fraction_non_alphanumeric': 0.1274171270718232, 'fraction_numerical': 0.0, 'mean_word_length': 1.486695278969957, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '2570762', 'n_tokens_mistral': 802, 'n_tokens_neox': 815, 'n_words': 143}