Closed mehaase closed 2 years ago
Attaching a screenshot… (this is using the AA20-302A.pdf sample report in TRAM's own test data)
Hi @mehaase , Have you resolved json reading issue? I'm also facing the same. Please let me know if there is anyway to read the exported JSON file.
Investigating this issue today. From the command line I can download the json file just fine, e.g.,
http -v "localhost:8000/api/report-export/9/?type=json" "Cookie: sessionid=(REDACTED)" > report.json
It seems this issue is triggered only in the browser, because the browser sends the header Accept: text/html
whereas the command line (HTTPie) sends Accept: application/json
. I think DRF's Content Negotiation is getting in the way.
This is fixed in #180 and released in v1.2.0.
It is exporting a JSON object, but it is embedded inside of an HTML document. It is supposed to be a stand-alone JSON document.