decentralized-identity / trustdidweb

Trust DID Web (did:tdw)
https://identity.foundation/trustdidweb/
Other
27 stars 10 forks source link

Proper content-type for `.jsonl` #44

Open brianorwhatever opened 7 months ago

brianorwhatever commented 7 months ago

Continuing discussions from #41 I think we need to specify something.

When I upload it to a browser it says it's application/octet-stream.

There doesn't appear to be a consensus in https://github.com/wardi/jsonlines/issues/19

The proposal there is application/jsonl which I think looks like a typo..

Another proposal in there (amazon uses) is application/jsonlines which seems pretty good to me other than not being in IANA

swcurran commented 7 months ago

We could help the JSON Lines folks write a draft spec so that our draft spec would be complete and so that we can make an IANA submission. Turtles all the way down…

I think we go with application/jsonlines, but I’m not the expert in this area. It just feels right...

swcurran commented 4 months ago

Andrew has found that text/jsonl is the right thing to use:

I updated the demo DID on anywhy.ca, and set the mime type for jsonl to 'text/jsonl' as that helps it render properly in a browser (apparently that's what Shopify uses)

brianorwhatever commented 4 months ago

@andrew is it application/jsonl or text/jsonl? The jsonl website recommends application. I see some talk from shopify stuff but can’t find this. Will test with my shopify account when I get a chance

On Fri, Aug 2, 2024 at 2:00 PM Stephen Curran @.***> wrote:

Andrew has found that text/jsonl is the right thing to use:

I updated the demo DID on anywhy.ca, and set the mime type for jsonl to 'text/jsonl' as that helps it render properly in a browser (apparently that's what Shopify uses)

— Reply to this email directly, view it on GitHub https://github.com/bcgov/trustdidweb/issues/44#issuecomment-2266139033, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWK6FGKJWU7NM6QL6SC2STZPPXOTAVCNFSM6AAAAABGDTWFOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRWGEZTSMBTGM . You are receiving this because you authored the thread.Message ID: @.***>

PatStLouis commented 2 months ago

I was looking into this as well, I also landed on application/octet-stream as there is no registered MIME type for jsonlines. Is there documentation about text/jsonl?

swcurran commented 1 month ago

All -- we need to nail this down. Someone be bold here :-) . Once decided, clarification to the specification.

PatStLouis commented 1 month ago

I think regardless of the decision we use in the spec, it's not an official media type. I have settled for text/jsonl in the tdw server. This can easily be changed.

andrewwhitehead commented 1 month ago

I still like text/jsonl. As the MDN web docs describe the text type:

Text-only data including any human-readable content, source code, or textual data such as comma-separated value (CSV) formatted data. Examples include: text/plain, text/csv, and text/html.

It also has the benefit that you can specify the charset parameter as utf-8.

brianorwhatever commented 1 month ago

I think we have consensus on text/jsonl