got scala to recognize implicitly defined mapping between segment and json