issue #1: handle json with missing optional fields