added a method #before* and #after* in SerializationContext