I have a JSON payload encoded to Base64 that needs to be stored in a ByteBuffer to be returned.
Upon trying to convert it from Base64 to JSON on base64decode.org I am able to get the proper json but on trying to do the same in code, it just prints out the data but not the {
, }
or the :
I am using DatatypeConverter.parseBase64Binary
to achieve it.
What should I use in the code to return the properly formatted JSON payload?
Asked
Active
Viewed 42 times
0

Vaibhav
- 11
- 1
-
Please show the code you have written, including how you print the output, an example of the input, and the output. – tgdavies Aug 30 '21 at 00:15
-
try this https://stackoverflow.com/questions/19743851/base64-java-encode-and-decode-a-string – Alberto Sinigaglia Aug 30 '21 at 00:22