|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
Type-and-mimetype indexed serialization of values to/from Chunks. More...
#include <any>#include <cstddef>#include <functional>#include <string>#include <string_view>#include <typeindex>#include <typeinfo>#include <utility>#include <vector>#include <absl/base/nullability.h>#include <absl/status/status.h>#include <absl/status/statusor.h>#include "a11/data/types.h"Go to the source code of this file.
Classes | |
| class | a11::data::SerializationRegistry |
| A registry of serializers and deserializers indexed by type and MIME. More... | |
Namespaces | |
| namespace | a11 |
| namespace | a11::data |
Functions | |
| SerializationRegistry & | a11::data::GlobalSerializationRegistry () |
| Returns the process-wide registry (defaults pre-installed). | |
Variables | |
| constexpr std::string_view | a11::data::kJsonMimetype = "application/json" |
| Media type of the built-in JSON codec. | |
| constexpr std::string_view | a11::data::kMsgpackMimetype = "application/x-msgpack" |
| Media type of the built-in MessagePack codec. | |
Type-and-mimetype indexed serialization of values to/from Chunks.
a11::data::SerializationRegistry maps a C++ type together with a media type (its representation) to a serializer/deserializer pair, so arbitrary values can be converted to and from a11::data::Chunk. A serialized chunk records both halves: its mimetype embeds a stable type tag (for example "application/json;type=..."), letting the deserializer recover the intended type. JSON and MessagePack codecs are available as defaults.