file parser the returns files structure as a json object