you should make jsonschema and check that results are properly formated  before doing next steps  it s user input and users are dummy usually if file is wrong you should probably log warnings or just stop exectuion  i think stopping execution with code is better 