Move Json use into try catch to avoid crash