diff --git a/ext/vjson/json.cpp b/ext/vjson/json.cpp index cc6dfd5ed..81dea3807 100644 --- a/ext/vjson/json.cpp +++ b/ext/vjson/json.cpp @@ -3,6 +3,8 @@ #include #include "json.h" #include "file/easy_file.h" +#include "file/zip_read.h" +#include "file/vfs.h" // true if character represent a digit #define IS_DIGIT(c) (c >= '0' && c <= '9') @@ -615,6 +617,12 @@ JsonReader::JsonReader(const std::string &filename) : alloc_(1 << 12), root_(0) if (buffer_) { parse(); } else { - ELOG("Failed to read json %s", filename.c_str()); + // Okay, try to read on the local file system + buffer_ = (char *)ReadLocalFile(filename.c_str(), &buf_size); + if (buffer_) { + parse(); + } else { + ELOG("Failed to read json %s", filename.c_str()); + } } }