WordPress: add_filter in plugin being ignored - json media type
https://core.trac.wordpress.org/ticket/45633
This is a core bug, for whatever reason the mime type is being interpreted as text/plain
.
Until the bug is fixed, a hotfix is available as a filter in the comments on that ticket