file parser that returns the files structure as a json object