Refactored json parsing to use library maybe function