#ifndef HM_JSON_PARSER_H
#define HM_JSON_PARSER_H

#include "value.h"

namespace json {
    class Parser {
    private:
        std::string _str;
        unsigned _idx;

        char next_real();

        bool is_str_end(unsigned const &pos);

        Value _parse();

        Value parse_null();

        Value parse_bool();

        Value parse_number();

        Value parse_string();

        Value parse_list();

        Value parse_dict();

    public:
        Parser();

        Value parse(const std::string &str);
    };
}

#endif //HM_JSON_PARSER_H