|
metadata 0.2.0
Modern C++23 header-only metadata container (JSON-like)
|
Parcel cell wrapping an md::Object (a.k.a.
More...
#include <parcel.hpp>
Inherits parcel::BaseCell< ObjectCell, Object >.
Public Member Functions | |
| ObjectCell (std::initializer_list< Object::value_type > il) | |
Brace-init passthrough so md::ObjectCell{{"k", 1}, {"k2", "v"}} mirrors md::Object{...} exactly; no wrapper type at the call site. | |
| std::string | to_string () const override |
Compact textual rendering of the wrapped md::Object, identical to streaming via operator<<. | |
Static Public Member Functions | |
| static parcel::cell_t | from_json (parcel::json_t const &j, parcel::ParcelRegistry const &) |
| Parcel deserialization entry point. | |
| static parcel::cell_type_descriptor_t | descriptor () |
Registry descriptor for ObjectCell. | |
Static Public Attributes | |
| static constexpr std::string_view | kind_id = "md:o" |
Wire-stable kind id reported under the "k" slot. | |
Parcel cell wrapping an md::Object (a.k.a.
md::Metadata).
Wire kind: md:o. The "v" slot is a JSON object whose values are themselves serialized through the md::Value JSON adapter.
|
inline |
Brace-init passthrough so md::ObjectCell{{"k", 1}, {"k2", "v"}} mirrors md::Object{...} exactly; no wrapper type at the call site.
| il | Initializer list of {key, value} pairs. |
|
inlinestatic |
Parcel deserialization entry point.
Validates "k" == "md:o" and decodes "v" as an md::Object via the <md/json.hpp> ADL hooks.
| parcel::ParcelException | on shape or kind mismatch. |