Refactor JSONResource to be an echo resource