I have a json file in the same directory where my ansible script is. Following is the content of json file:
{ \"resources\":[ {\"name\":\"package1\",
You have to add a from_json jinja2 filter after the lookup:
from_json
version_file: "{{ lookup('file','/home/shasha/devOps/tests/packageFile.json') | from_json }}"