Skip to content

Conversation

@baywet
Copy link
Member

@baywet baywet commented Mar 9, 2021

  • adds a serializer to handle actions & functions with primitive return types
  • fixes a bug where null content on post request would have a wrong application/octet-stream content type

fixes #687

@baywet baywet added this to the 2.10.0 milestone Mar 9, 2021
@baywet baywet self-assigned this Mar 9, 2021
@baywet baywet enabled auto-merge March 9, 2021 19:02
Copy link
Contributor

@zengin zengin left a comment

Choose a reason for hiding this comment

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

Looks good, but I feel that this logic should belong to the core library as the beta service library will also be subject to the same bug. What do you think?

final JsonElement element = json.getAsJsonObject().get("@odata.null");
if(element != null && element.isJsonPrimitive()) {
return getPrimitiveValue(element, type);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: else block can be removed

@baywet baywet deleted the bugfix/default-content-type-and-boolean-deserialization branch March 9, 2021 19:51
@baywet
Copy link
Member Author

baywet commented Mar 9, 2021

@zengin thanks for the review. Yeah all of that has been moved to the core library with the v3 work. I just authored the reflective PR for v3 in core (see the item linked right above this comment).
As v2 is still the mainline for the time being and as this was not a breaking change fix, I also implemented it for v2. But thanks for calling it out.

@zengin
Copy link
Contributor

zengin commented Mar 9, 2021

@baywet thanks for the TL;DR. it was a long thread, I must have missed it while skimming through :)

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.

Json Parsing Error during invalidating tokens

3 participants