serialization

Serializes data structures into JSON, Protocol Buffers, or MessagePack with schema evolution.

53|1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/cosmix/claude-code-setup --skill serialization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serialization
Source: https://github.com/cosmix/claude-code-setup/tree/main/skills/serialization
Command: npx skills add https://github.com/cosmix/claude-code-setup --skill serialization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers JSON, Protocol Buffers, MessagePack, and schema evolution strategies for cross-language data exchange.

Core Features & Use Cases

  • JSON & Binary Formats: When to use human-readable vs compact binary formats.
  • Schema Evolution: Versioning and compatibility handling.
  • Custom Serializers: Extensibility for complex data types.

Quick Start

Serialize a Python dict to JSON and back, handling a date field with ISO8601.

Frequently Asked Questions about serialization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between JSON, Protocol Buffers, and MessagePack for data interchange?

JSON offers human-readable text format ideal for APIs and web services, Protocol Buffers provide compact binary serialization with strong schema support, and MessagePack delivers efficient binary compression for high-throughput systems. Choose JSON for simplicity and debuggability, Protocol Buffers for strict versioning and cross-language compatibility, and MessagePack for bandwidth-constrained environments.

What's the best way to handle schema evolution and backward compatibility in serialized data?

Schema evolution strategies maintain backward and forward compatibility by allowing optional fields, versioning mechanisms, and graceful field handling. Protocol Buffers enforce this natively through field numbering and optional semantics. Plan field additions carefully, avoid removing fields, and use versioning schemes to support multiple data formats simultaneously across service boundaries.

How do I serialize date and time fields correctly across different formats?

Serialize dates consistently using ISO8601 standard format, which works across JSON, Protocol Buffers, and MessagePack. Store timezone information explicitly and standardize on UTC internally to avoid ambiguity. This ensures reliable interchange between systems and languages without platform-specific datetime parsing issues.

Can I use custom serializers for complex data types not natively supported?

Yes, custom serializers extend built-in format capabilities for domain-specific types. Implement serialization logic that converts complex objects to supported primitives, handles edge cases, and maintains compatibility with schema evolution rules. Document custom serializer behavior to ensure consistency across teams and services.

What naming conventions should I follow for serialized fields across languages?

Enforce consistent naming conventions—snake_case for JSON APIs, camelCase for JavaScript, or language-native styles with explicit mapping rules. Define these conventions upfront and enforce them through schema definitions and serialization frameworks to prevent field-name mismatches during cross-language data exchange.

How should I handle null values in different serialization formats?

Null semantics differ across formats: JSON explicitly supports null, Protocol Buffers use optional fields and presence tracking, and MessagePack treats null as a distinct type. Define explicit null-handling policies—distinguish between missing fields and intentional nulls—and document assumptions to avoid silent data loss during deserialization.