25 #ifndef INCLUDED_JSONResolvePossibleRef_h_GUID_64F277A1_33F0_4986_6EEE_09E17C09AA52
26 #define INCLUDED_JSONResolvePossibleRef_h_GUID_64F277A1_33F0_4986_6EEE_09E17C09AA52
32 #include <json/value.h>
40 enum class FileLoadStatus {
45 enum class ValueHandledAs { Filename, String, JsonRefToFile, Other };
48 FileLoadStatus status;
51 using FileLoadAttempts = std::vector<FileLoadAttempt>;
55 bool resolved =
false;
56 ValueHandledAs handledAs = ValueHandledAs::Other;
57 FileLoadAttempts fileAttempts;
60 const char *fileLoadStatusToString(FileLoadStatus status);
76 bool stringAcceptableResult =
false,
77 std::vector<std::string>
const &searchPath =
78 std::vector<std::string>());
82 bool stringAcceptableResult =
false,
83 std::vector<std::string>
const &searchPath =
84 std::vector<std::string>());
89 #endif // INCLUDED_JSONResolvePossibleRef_h_GUID_64F277A1_33F0_4986_6EEE_09E17C09AA52
Json::Value resolvePossibleRef(Json::Value const &input, bool stringAcceptableResult, std::vector< std::string > const &searchPath)
Given an input that might be a filename, might be a JSON Pointer-style $ref object, and might just directly be an object, return the object desired.
ResolveRefResult resolvePossibleRefWithDetails(Json::Value const &input, bool stringAcceptableResult, std::vector< std::string > const &searchPath)