void register(Type type, Pickler pickler) { var id = pickler.id; typeMappings[type] = id; if (picklers[id] == null) picklers[id] = pickler; }