def validate_json_file(file):
    try:
        data = generics_utils.check_json_syntax(file)
        if data is None:
            return
        #check manadatory fields
        if "stack" in data:
            stack=check_mandatory_stack(data["stack"])
            if stack is None:
                return
        #else:
        #        print "No stack section find in the template file"
        #        return

        if "builders" in data:
            check_mandatory_builders(data["builders"])

        return data
    except __HOLE__ as e:
        printer.out("JSON parsing error: "+str(e), printer.ERROR)
        printer.out("Syntax of template file ["+file+"]: FAILED")
    except IOError as e:
        printer.out("unknown error template json file", printer.ERROR)



#manage uforge exception
dataset/ETHPy150Open usharesoft/hammr/src/hammr/utils/hammr_utils.py/validate_json_file