JSOn Refactoring: replace marshalling methods by more generic ones