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

Opposite implementation of @JsonUnwrapped #92

Closed
hemantvsn opened this issue Jun 9, 2016 · 11 comments
Closed

Opposite implementation of @JsonUnwrapped #92

hemantvsn opened this issue Jun 9, 2016 · 11 comments

Comments

@hemantvsn
Copy link

Serializing object of the following class yeilds string like

public class User implements Serializable{

private Integer id;
private String name;
private Integer pinCode;
private String city;

// getters /setters

}

{"id":1,"name":"XYZ","pinCode":123456,"city":"ABC"}
But we want that attributes pinCode and city should be a part of new Json node say address node.

So my expectation of the result is:

{
"id": 1,
"name": "XYZ",
"address": {
"pinCode": 123456,
"city": "ABC"
}
}
Can this be accomplished without re-organizing the class structure and by using Json annotations

on the exact opposite lines of @JsonUnwrapped

http://stackoverflow.com/questions/37724834/jackson-serialize-and-wrap-attributes-into-a-new-object

@cowtowncoder
Copy link
Member

Did you check existing issues before filing new one? It seems to me that #42 is what you want.

@hemantvsn
Copy link
Author

Yeah...its same as 42
Closing it
Thanks

@andredasilvapinto
Copy link

Since #42 is locked and github hasn't added "something better than needing to add more +1 comments" during the last year:
👍

@cowtowncoder
Copy link
Member

@andredasilvapinto :)

Rest assured that I understand how highly wished this item is. +1 for github adding something, anything, to help with priorization wishes -- those are valuable, but right now lead to noise.

@mjustin
Copy link

mjustin commented Feb 1, 2021

Rest assured that I understand how highly wished this item is. +1 for github adding something, anything, to help with priorization wishes -- those are valuable, but right now lead to noise.

#42 (comment)

Enough voting -- locking issue for now, hoping github will add something better than needing to add more +1 comments. :)

Isn't this exactly what GitHub reactions (added 3/10/2016 — after the comment on #42 but before the above comment on this issue) are often used for?

@andredasilvapinto
Copy link

Not sure, as those can be also added for comments, are not exclusive for voting and might get easily lost or be unnoticed to the maintainers. Github needs first class voting support that can be easily tracked, not just emojis.

@mjustin
Copy link

mjustin commented Feb 1, 2021

@andredasilvapinto Let me restate. I've personally seen multiple projects use GitHub reactions for this purpose. For instance, I've seen multiple situations where the project owner has asked people to stop posting "+1" comments and instead use the GitHub reactions to vote for the item.

That said, I completely agree that this usage has its own issues, including the reasons you brought up, as well as the issue with people posting comments in projects that prefer the usage of GitHub reactions.

@andredasilvapinto
Copy link

@mjustin Let's hope GitHub comes up with a better feature for this use case that not only reduces noise, but is also easily trackable and assures reporters that the maintainers are aware of their continued interest in the feature/bug. Till then, let's use what we have.

@cowtowncoder
Copy link
Member

I'll unlock the other issue hoping users will add reactions -- it works well enough for "voting" purpose here, and I'll delete +1s if any.

@andredasilvapinto
Copy link

@cowtowncoder out of curiosity, how do you plan on tracking the number of reactions? going through the issues every now and then? I see there are not many open ones in this specific project, so it might work, but that is a manually intensive task which wouldn't really scale for repositories with multi-hundred open issues (like others in this org).

@cowtowncoder
Copy link
Member

@andredasilvapinto I don't track it regularly, but I sometimes go through lists of open issues. It's not a prime signal in general, but sort of "better than nothing", and is something users can do to indicate their preference.

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

No branches or pull requests

4 participants