Skip to content

Commit e8fd51a

Browse files
committed
runtime: Use fable::parse_json instead of Json::parse
1 parent 40b9abe commit e8fd51a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

runtime/include/cloe/handler.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class Request {
150150
/**
151151
* Helper method that tries to convert the body to a JSON object.
152152
*/
153-
virtual Json as_json() const { return Json::parse(body()); }
153+
virtual Json as_json() const { return fable::parse_json(body()); }
154154
};
155155

156156
/**

runtime/include/cloe/utility/resource_handler.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ResourceHandler {
8888
*/
8989
void to_json(cloe::Json& j, const ResourceLoader& c) {
9090
try {
91-
j = cloe::Json::parse(c.to_string());
91+
j = fable::parse_json(c.to_string());
9292
} catch (cloe::Json::type_error& e) {
9393
j = {c.res_.filepath(), c.to_string()};
9494
}

runtime/src/cloe/handler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void FromConf::operator()(const cloe::Request& q, cloe::Response& r) {
103103
if (convert_ && !q.query_map().empty()) {
104104
Json j;
105105
for (auto const& kv : q.query_map()) {
106-
j[kv.first] = Json::parse(kv.second);
106+
j[kv.first] = fable::parse_json(kv.second);
107107
}
108108
try {
109109
ptr_->from_conf(Conf{q.as_json()});

0 commit comments

Comments
 (0)