While changing this, I realized the output will end up looking a little strange since it will be wrapped in quotes since it's just being json_encoded.

It'll end up looking like `{"foo":{"bar":"new BinData(\"anVuayBkYXRh\", \"2\")"}}`.

If that's fine, then I'll leave it as is. Otherwise, maybe just a tag like `"BINARY: anVuayBkYXRh, TYPE: 2"`