json-related refactor

This commit is contained in:
MihailRis
2024-05-20 03:06:26 +03:00
parent 45862269e7
commit 7fdacffe53
7 changed files with 30 additions and 35 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
#include "json.hpp"
#include "commons.hpp"
#include "../data/dynamic.hpp"
#include "../util/stringutil.hpp"
@@ -240,11 +242,11 @@ Value Parser::parseValue() {
throw error("unexpected character '"+std::string({next})+"'");
}
std::unique_ptr<Map> json::parse(const std::string& filename, const std::string& source) {
dynamic::Map_sptr json::parse(const std::string& filename, const std::string& source) {
Parser parser(filename, source);
return parser.parse();
}
std::unique_ptr<Map> json::parse(const std::string& source) {
dynamic::Map_sptr json::parse(const std::string& source) {
return parse("<string>", source);
}