Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate If JsonFlatten Should Deeply Flatten #21506

Closed
alzimmermsft opened this issue May 14, 2021 · 2 comments
Closed

Investigate If JsonFlatten Should Deeply Flatten #21506

alzimmermsft opened this issue May 14, 2021 · 2 comments
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@alzimmermsft
Copy link
Member

Investigate if JsonFlatten serialization should deeply flatten the object and its properties. The following is a comment on its handling.

// Why does this deeply flatten all sub-classes, collection, and map values?
// Should JsonFlatten simply flatten the top level property, ex
// @JsonProperty("my.flattened.value")
// private Map<String, String> value;
//
// Turns into
// {
//   "my":
//   {
//     "flattened":
//     {
//        "value": <serialized map here>
//     }
//   }
// }
@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Azure.Core azure-core labels May 14, 2021
@alzimmermsft alzimmermsft added this to the [2021] August milestone May 27, 2021
@alzimmermsft
Copy link
Member Author

This has been resolved by changes to support annotating fields with JsonFlatten and updates to how class level JsonFlatten is applied.

@samvaity
Copy link
Member

samvaity commented Aug 10, 2021

According to the work/investigation on task #20150, we should aggressively/deeply flatten when@JsonFlatten is provided irrespective of the type ref parameter. Since it allows the users to specify a property hierarchy more conveniently.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library.
Projects
Status: Done
Development

No branches or pull requests

2 participants