I'll have to look into HAL.

As for the context I suppose each of the serializers methods could accept the resource itself or the serializer can implement a setResource method so it can internally inspect the resource. Would that be the best way of going about that do you think?