1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Add JSON loading for footpath items

This commit is contained in:
Ted John
2017-12-10 17:42:39 +00:00
committed by Gymnasiast
parent e8b28965cc
commit d56f1445f8
6 changed files with 123 additions and 17 deletions

View File

@@ -29,6 +29,14 @@ using namespace OpenRCT2;
namespace ObjectJsonHelpers
{
bool GetBoolean(const json_t * obj, const std::string &name, bool defaultValue)
{
auto value = json_object_get(obj, name.c_str());
return json_is_boolean(value) ?
json_boolean_value(value) :
defaultValue;
}
std::string GetString(const json_t * value)
{
return json_is_string(value) ?