qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
json.h File Reference

JSON utility functions and types for the qb framework. More...

#include "qb/io/protocol/json.h"
#include "uuid.h"
Include dependency graph for json.h:

Go to the source code of this file.

Classes

struct  nlohmann::jsonb
 A wrapper around nlohmann::json providing a qb::jsonb type, often used for binary JSON (BSON) or similar dense representations. More...
struct  std::hash< qb::jsonb >
 Specialization of std::hash for qb::jsonb. More...

Typedefs

using nlohmann::pointer = json::pointer
 JSON pointer type from nlohmann::json library.
using nlohmann::object = json
 Alias for the main JSON type from nlohmann::json.
using nlohmann::array = json::array_t
 JSON array type from nlohmann::json.
using nlohmann::string = json::string_t
 JSON string type from nlohmann::json.
using nlohmann::number = json::number_integer_t
 JSON integer number type from nlohmann::json.
using nlohmann::floating = json::number_float_t
 JSON floating-point number type from nlohmann::json.
using nlohmann::boolean = json::boolean_t
 JSON boolean type from nlohmann::json.

Functions

void uuids::to_json (qb::json &obj, qb::uuid const &id)
 Converts a UUID to a JSON object.
void uuids::from_json (qb::json const &obj, qb::uuid &id)
 Converts a JSON object to a UUID.
std::ostream & operator<< (std::ostream &os, const qb::jsonb &j)
 Stream output operator for qb::jsonb.

Detailed Description

JSON utility functions and types for the qb framework.

This file provides a simple JSON utility using the nlohmann/json library. It includes a namespace alias for the json type and a simple JSON utility function for parsing JSON strings.

Author
qb - C++ Actor Framework

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.