Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: Add support for line breaks for base64 input to json.Unmarshal() #16578
I would like to see
With the current implementation, however, it does panic:
Why? It would make it easier to write readable unit tests of code that does a lot of marshaling and unmarshaling of custom data types.
I can't imagine it would be especially expensive to support this feature always, as I imagine simply filtering out all whitespace from the input stream would do it. But if it did prove to be expensive, supporting it only optionally some how would be reasonable for me as well.