refactoring infrastructure to use javax.json library