Imported data can carry fields the application never meant to accept. A generic object loader may turn a type label into behavior, or copy a role field over trusted account state. The danger comes from granting meaning to untrusted structure, even when the visible content looks like ordinary JSON.
The adapter here accepts a plain note. Keep the supported type and field set narrow, and preserve empty text because it's a valid note. This is a model of deserialization policy, not a real class loader. For production formats, avoid constructing attacker-selected classes, use maintained parsers and explicit data schemas, and verify any integrity protection before trusting the payload.
Read the fixed handler, then apply the same idea to each exercise.