Add type class for JSON