-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow using @JsonPropertyOrder with any-property (@JsonAnyGetter) #4775
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
Changes from all commits
6b13aeb
85422ed
8fe3a1f
7a067d9
8f3a301
d62c154
0cfc627
daf659d
7e97e1f
9262fde
e6dfd8d
6ce6510
6a0e2fd
9b7a14a
941b320
b3947a3
46af6cb
871bf62
9f86204
0c5671d
9a04fa6
6f6db89
9411e9c
47da548
f850530
d615b2c
4748172
c7be024
59068cc
215f7cc
ae2cdaf
4955723
9910b8c
262591e
4e04b31
7853276
ee48c89
2a70f63
6c32eeb
2dca8b8
1eb4bc2
5da2bb6
f43515f
0b66cf6
85741b8
3c0f5be
991df95
7808fd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,7 +147,6 @@ protected BeanSerializerBase asArraySerializer() | |
* - have per-property filters | ||
*/ | ||
if ((_objectIdWriter == null) | ||
&& (_anyGetterWriter == null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we know this (serialize-as-array) actually works? Is there a test for that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Surprising findings: 1_ Discovered I don’t fully recall my thought process back then, but it seems like an improvement. But changes behavior 🥲 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But still, let's see if we can actually flatten this one as-array? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nvm, let's do separate PR for the flattening part. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. So, flattening is one part, but the other is that with Arrays, name is implied by position. This is why I am not sure any-getter can actually be supported with as-array Shape. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh! I see -- instead of flattening entries of any-getter, they could instead be serialized as single Object with key/value pairs retained. That would actually make some sense since it would reliably map into specific index and retain information. It would not be really "as-array", but does best that can be achieved, I think. I like that behavior, if I understood it correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The flattening out part suggested because I thought what we can do is serialize...
But I guess that would make deserialization complex There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But what you said about retaining index based property location-implication makes sense 👍🏼 |
||
&& (_propertyFilterId == null) | ||
) { | ||
return new BeanAsArraySerializer(this); | ||
|
Uh oh!
There was an error while loading. Please reload this page.