22#ifndef BACKENDS_NETWORKING_HTTP_HTTPJSONREQUEST_H
23#define BACKENDS_NETWORKING_HTTP_HTTPJSONREQUEST_H
25#include "backends/networking/http/httprequest.h"
26#include "common/memstream.h"
27#include "common/formats/json.h"
31typedef Response<const Common::JSONValue *> JsonResponse;
35#define HTTP_JSON_REQUEST_BUFFER_SIZE 512 * 1024
53 static bool jsonIsObject(
const Common::JSONValue *item,
const char *warningPrefix);
54 static bool jsonContainsObject(
const Common::JSONObject &item,
const char *key,
const char *warningPrefix,
bool isOptional =
false);
55 static bool jsonContainsString(
const Common::JSONObject &item,
const char *key,
const char *warningPrefix,
bool isOptional =
false);
56 static bool jsonContainsIntegerNumber(
const Common::JSONObject &item,
const char *key,
const char *warningPrefix,
bool isOptional =
false);
57 static bool jsonContainsArray(
const Common::JSONObject &item,
const char *key,
const char *warningPrefix,
bool isOptional =
false);
58 static bool jsonContainsStringOrIntegerNumber(
const Common::JSONObject &item,
const char *key,
const char *warningPrefix,
bool isOptional =
false);
59 static bool jsonContainsAttribute(
const Common::JSONObject &item,
const char *key,
const char *warningPrefix,
bool isOptional =
false);
Definition: memstream.h:194
Definition: httpjsonrequest.h:37
virtual void finishJson(const Common::JSONValue *json)
Definition: httprequest.h:42