Open cyberphone opened 8 years ago
What's wrong with doing it client side instead of making the json encoder do mime sniffing on the data?
img.src = 'data:image/png;base64,' + data.Blob;
@OneOfOne There's nothing wrong with sniffing in a browser scenario but I'm targeting another class of applications where there is no room for such measures: https://cyberphone.github.io/openkeystore/resources/docs/jsonsignatures.html
Yes, an option must also work for unmarshalling.
It's rather trivial to implement your own type for that though.
@OneOfOne Indeed I could but you should consider this issue related to a bunch of issues which makes the current Marshaller/Unmarshaller close to useless in my context: https://github.com/golang/go/issues/14750 https://github.com/golang/go/issues/14749 https://github.com/golang/go/issues/14135