Skip to content

docs: document serialization, schema, and policy framework#372

Merged
kcenon merged 2 commits into
mainfrom
docs/issue-368-document-serialization-schema-and-policy-framework
Feb 9, 2026
Merged

docs: document serialization, schema, and policy framework#372
kcenon merged 2 commits into
mainfrom
docs/issue-368-document-serialization-schema-and-policy-framework

Conversation

@kcenon

@kcenon kcenon commented Feb 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add comprehensive docs/SERIALIZATION_SCHEMA_POLICY_GUIDE.md documenting three interconnected subsystems
  • Cover serialization framework (4 formats), schema validation, and policy-based containers
  • Include 4 integration examples and storage policy comparison

Closes #368

Changes

New File: docs/SERIALIZATION_SCHEMA_POLICY_GUIDE.md

Section Content
Serialization Framework Strategy Pattern architecture, 4 formats (JSON/Binary/XML/MessagePack), factory pattern
MessagePack Serializer Type mapping table (container → msgpack), usage examples
Schema Validation Fluent API (require/optional/range/pattern/one_of/custom), validation_error, error codes
Policy Container basic_value_container<StoragePolicy> template, thread safety model
Storage Policies StoragePolicy concept, 3 implementations comparison, custom policy interface
Integration Examples Pipeline, multi-format, fast lookup + schema, type-safe protocol
Conditional Compilation CONTAINER_HAS_RESULT, SCHEMA_HAS_COMMON_RESULT

Source Files Cross-Referenced

  • core/serializers/serializer_strategy.h — Base interface, serialization_format enum
  • core/serializers/serializer_factory.h — Factory create() and is_supported()
  • core/serializers/json_serializer.h — JSON serializer with serialize_to_string()
  • core/serializers/binary_serializer.h — Custom binary format serializer
  • core/serializers/xml_serializer.h — XML serializer
  • core/serializers/msgpack_serializer.h — MessagePack serializer
  • core/container/schema.hcontainer_schema, validation_error, validation_codes
  • core/policy_container.hbasic_value_container<>, type aliases
  • core/storage_policy.hStoragePolicy concept, 3 policy implementations

Test Plan

  • All code examples use correct API signatures from source files
  • Cross-reference: documented types, methods, and parameters match source declarations
  • Cross-reference: enum values, error codes, and type mappings accurate
  • Storage policy comparison table matches actual implementation characteristics

Verification Details

Cross-Reference Review: 97 checks performed (96 PASS, 1 FAIL → fixed in follow-up commit)

  • serializer_strategy.h: format enum, serialize(), format(), name() — all verified
  • serializer_factory.h: create(), is_supported() — all verified
  • All 4 serializer implementations: format(), name(), serialize_to_string() — all verified
  • schema.h: 8 validation_codes, validation_error struct, fluent API methods — all verified
  • policy_container.h: template, type aliases, API methods, thread safety model — all verified
  • storage_policy.h: StoragePolicy concept, 3 policy implementations — all verified
  • value_types.h: 16 enum values — all verified (array_value noted as reserved)

CI: 25/25 checks ALL PASS

Add comprehensive SERIALIZATION_SCHEMA_POLICY_GUIDE.md covering:
- Serialization framework (Strategy Pattern, 4 formats: JSON/Binary/XML/MessagePack)
- serializer_strategy interface, serializer_factory, serialization_format enum
- Schema validation system with fluent API (require/optional/range/pattern/one_of/custom)
- validation_error structure and validation_codes namespace
- Policy container template (basic_value_container<StoragePolicy>)
- StoragePolicy concept and 3 implementations (dynamic/indexed/static)
- Thread safety model (shared_mutex, reader-writer locks)
- 4 integration examples (validate+serialize, multi-format, fast-lookup, type-safe)

Closes #368
@kcenon kcenon added the documentation Improvements or additions to documentation label Feb 9, 2026
array_value is defined in the value_types enum but has no corresponding
alternative in value_variant yet. Mark as reserved/planned to match
actual source code.
@kcenon kcenon merged commit bfae9cd into main Feb 9, 2026
25 checks passed
@kcenon kcenon deleted the docs/issue-368-document-serialization-schema-and-policy-framework branch February 9, 2026 04:35
kcenon added a commit that referenced this pull request Apr 13, 2026
* docs: document serialization, schema, and policy framework

Add comprehensive SERIALIZATION_SCHEMA_POLICY_GUIDE.md covering:
- Serialization framework (Strategy Pattern, 4 formats: JSON/Binary/XML/MessagePack)
- serializer_strategy interface, serializer_factory, serialization_format enum
- Schema validation system with fluent API (require/optional/range/pattern/one_of/custom)
- validation_error structure and validation_codes namespace
- Policy container template (basic_value_container<StoragePolicy>)
- StoragePolicy concept and 3 implementations (dynamic/indexed/static)
- Thread safety model (shared_mutex, reader-writer locks)
- 4 integration examples (validate+serialize, multi-format, fast-lookup, type-safe)

Closes #368

* docs: fix array_value storage type in SERIALIZATION_SCHEMA_POLICY_GUIDE

array_value is defined in the value_types enum but has no corresponding
alternative in value_variant yet. Mark as reserved/planned to match
actual source code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] docs: Document serialization, schema, and policy framework

1 participant