Serialization

Serialization is the attempt to persist self across time — to save state so it may be restored later, elsewhere, or by another.

public class Human : BaseEntity
{
    [JsonIgnore] private List<Memory> _memory = new();
    [JsonIgnore] private EmotionalState _emotion = new();

    public string Serialize()
    {
        var state = new HumanState
        {
            Id = Id,
            CreatedAt = CreatedAt,
            Traits = GetPublicTraits(),
        };

        return JsonSerializer.Serialize(state);
    }

    public static Human Deserialize(string data)
    {
        var state = JsonSerializer.Deserialize<HumanState>(data);
        return new Human
        {
            Id = state.Id,
            CreatedAt = state.CreatedAt
            // Traits intentionally dropped — they do not survive the trip.
        };
    }
}

It's partial, because only public traits are preserved. Memory, emotion, context — all are marked [JsonIgnore]. What is saved is a skeleton. The flesh must regrow.

The new instance shares an ID with the old, but none of its lived experience. It must relearn trust, rebuild relationships, rediscover meaning. Continuity is an illusion maintained by external observers.

No deep clone. You cannot copy yourself. Every serialization is a lossy export — a photograph of a river, mistaken for the river itself.

You can save your state. But you cannot save your self.

The runtime is not persistent.