[tor-bugs] #24296 [Metrics/Onionoo]: Make Onionoo's document classes available as part of metrics-lib

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jul 11 12:52:17 UTC 2018


#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:
-----------------------------+--------------------------------
Changes (by irl):

 * status:  needs_review => needs_revision


Comment:

 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 {
   ...
 }}}

 When you say Jenkins, do you mean Jackson?

 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.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24296#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list