seanmonstar / warp

A super-easy, composable, web server framework for warp speeds.
https://seanmonstar.com/post/176530511587/warp
MIT License
9.59k stars 723 forks source link

JSON-LD filter? #576

Open alexwennerberg opened 4 years ago

alexwennerberg commented 4 years ago

This is a potentially niche issue -- I'm working on an ActivityPub server, and the JSON filter in Warp doesn't allow JSON-LD. I put together a modified filter that accepts JSON-LD (basically just the same as the json filter but with a mime type of "application/ld+json"), and I was wondering if a PR to Warp would be valuable, or if JSON-LD is rare enough that it's not worth including? Or maybe the JSON filter could accept JSON-LD as well?

Thanks for putting this library together, it rocks!

pyfisch commented 4 years ago

There are quite a few formats that contain JSON data and end in +json. It may be worthwile to include them all (with a pattern) in the JSON filter.