Mode
Description:
[ Flags ]
public enum Mode
Json encode/decode and Stream
GObject decode options.
Combine flags with bitwise OR (e.g. AUTO |
IGNORE_UNKNOWN). Use the Flags attribute so combined values are
valid.
Example
var json = new OLLMrpc.Bin.Json(
OLLMrpc.Bin.Mode.AUTO | OLLMrpc.Bin.Mode.IGNORE_UNKNOWN);
var stream = new OLLMrpc.Bin.Stream(in_stream, out_stream) {
mode = OLLMrpc.Bin.Mode.AUTO
};
Content:
Enum values:
- AUTO - Typed root encode without *type
; JSON member names are written as bin tags for Vala/GObject lookup (HTTP Hub): leading _ maps to underscore_, then _
to -; GObject-reserved wire names (e.g. type) map to reserved_property_NAME properties on decode and
reserved_property_NAME encodes as wire NAME.
- AUTO_STR - On decode: scalar string wire
values whose GObject property is not GLib.Type.STRING fill name_str when that companion string property
exists (Hub cardData variants).
- EXPLICIT - Default: every object needs
wire meta key *type; nested objects need explicit aliases.
- IGNORE_UNKNOWN - Log
GLib.critical on unknown bin properties and continue decode.