Skip to content

Conversation

jillingk
Copy link
Contributor

Description
Removed base64 encoding from bytearray adapter, and generated the JSON.java classes again.

Tested scenarios
UT's

@jillingk jillingk changed the title [PW-7442] JSON.java template to fix byte-array adapter [PW-7442] Change JSON.java template to fix byte-array adapter Dec 23, 2022

String expected = "\"mpiData\":{\"cavv\":\"AQIDBAUGBwgJCgsMDQ4PEBESExQ=\"}";
// Unicode representation of the string
String expected = "\"mpiData\":{\"cavv\":\"AQIDBAUGBwgJCgsMDQ4PEBESExQ\\u003d\"}";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the API expect this format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unicode, which apparently most APIs would be able to handle just fine. @michaelpaul do you think our API's handle this? I can alternatively remove this by ignoring the html escaping in the gsonbuilder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just verified with actual request in api logs, API does properly parse this string with the html escaping like that!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it's our previous encoder:

I think we can proceed with this new one since its very similar.

@wboereboom wboereboom merged commit 7b51f61 into develop Dec 23, 2022
@wboereboom wboereboom deleted the PW7442 branch December 23, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants