When responding to a http
request for a file of type jsonl
, i.e., a collection of json object separated by new lines, what mime type should I set? I tried searching for jsonl mime type
and jsonl mimetype
on SO, but could not find anything about it.
My response is as follows (flask/python):
response = Response(
generate_jsonl(object_iterable),
mimetype='application/json',
headers={
'Content-Type': 'application/json;charset=UTF-8',
'Content-Disposition': 'attachment;filename=%s.json' % file_name,
},
)
Some web sites use application/json-lines
.
Some application/jsonl
.
And some even more exotic, like application/x-...
.
It seems to be a take-your-pick territory...