/* * Copyright 2004 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
// Robust conversion operators, better than the ones in JsonCpp. bool GetIntFromJson(const Json::Value& in, int* out); bool GetUIntFromJson(const Json::Value& in, unsignedint* out); bool GetStringFromJson(const Json::Value& in, std::string* out); bool GetBoolFromJson(const Json::Value& in, bool* out); bool GetDoubleFromJson(const Json::Value& in, double* out);
// Pull values out of a JSON array. bool GetValueFromJsonArray(const Json::Value& in, size_t n, Json::Value* out); bool GetIntFromJsonArray(const Json::Value& in, size_t n, int* out); bool GetUIntFromJsonArray(const Json::Value& in, size_t n, unsignedint* out); bool GetStringFromJsonArray(const Json::Value& in, size_t n, std::string* out); bool GetBoolFromJsonArray(const Json::Value& in, size_t n, bool* out); bool GetDoubleFromJsonArray(const Json::Value& in, size_t n, double* out);
// Convert json arrays to std::vector bool JsonArrayToValueVector(const Json::Value& in,
std::vector<Json::Value>* out); bool JsonArrayToIntVector(const Json::Value& in, std::vector<int>* out); bool JsonArrayToUIntVector(const Json::Value& in,
std::vector<unsignedint>* out); bool JsonArrayToStringVector(const Json::Value& in,
std::vector<std::string>* out); bool JsonArrayToBoolVector(const Json::Value& in, std::vector<bool>* out); bool JsonArrayToDoubleVector(const Json::Value& in, std::vector<double>* out);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.