Add spec for serializing active grammars