further refactoring to use implicitly on EncodeJson