[tor-bugs] #11577 [Onionoo]: Use Gson to format/parse documents rather than StringBuilder/Scanner
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Apr 21 07:40:58 UTC 2014
#11577: Use Gson to format/parse documents rather than StringBuilder/Scanner
-------------------------+-------------------------
Reporter: karsten | Owner: karsten
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Onionoo | Version:
Keywords: | Actual Points:
Parent ID: | Points:
-------------------------+-------------------------
Except for unit tests, we're formatting and parsing JSON documents
ourselves using classes like StringBuilder and Scanner. This was the
quickest way for me to produce a running prototype back in 2011, and it
scaled surprisingly well. But there are several reasons for finally
switching to a JSON library: less code, fewer bugs, and potentially better
performance. The most recent hack for #11350 made me think that we
finally have to switch to Gson for formatting and parsing all our JSON
documents.
The following classes should be (de-)serialized using Gson:
- UptimeDocument
- ClientsDocument
- WeightsDocument
- BandwidthDocument
- DetailsDocument
- DetailsStatus
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11577>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list