refactoring of the JsonConverter