#24296: Make Onionoo's document classes available as part of metrics-lib
-----------------------------+--------------------------------
 Reporter:  karsten          |          Owner:  metrics-team
     Type:  enhancement      |         Status:  needs_revision
 Priority:  Medium           |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+--------------------------------

Comment (by karsten):

 Replying to [comment:8 irl]:
 > The first commit looks ok, but I'd be happier with an explicit
 annotation on the class to indicate the naming strategy in case Jackson
 decides to change its default.
 >
 > {{{
 > @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
 > public class DetailsDocument extends Document {
 >   ...
 > }}}

 Agreed! In fact, we should consider adding explicit annotations for
 everything that we're currently configuring in the `ObjectMapper`.
 Ideally, these classes would be useful even without our class that
 configures an `ObjectMapper`.

 > When you say Jenkins, do you mean Jackson?

 Absolutely!

 > Additional getters and setters would be ok, but I think actually having
 the `ZonedDateTime` representations would be the more elegant solution.
 >
 > Even though not the "recommended" method,
 [[https://stackoverflow.com/a/27952473|this StackOverflow answer]] looks
 to contain an example of doing it in the way I had done it for Gson. This
 would avoid dependency on extra JARs which it looks like is the Jackson
 preferred way to do it.

 Agreed, this looks like an okay way of doing it.

 Thanks for reviewing and commenting! I'll put this back on my list.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24296#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Reply via email to