refactored to use Jackson instead of Gson