summaryrefslogtreecommitdiffstats
path: root/xmrstak/misc/jext.hpp
blob: f4a333c220f23493666da340bf9473b8dfdcbc13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include "xmrstak/rapidjson/document.h"
#include "xmrstak/rapidjson/error/en.h"

using namespace rapidjson;

/* This macro brings rapidjson more in line with other libs */
inline const Value* GetObjectMember(const Value& obj, const char* key)
{
	Value::ConstMemberIterator itr = obj.FindMember(key);
	if (itr != obj.MemberEnd())
		return &itr->value;
	else
		return nullptr;
}
OpenPOWER on IntegriCloud