[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:54:01 UTC 2014
#11577: Use Gson to format/parse documents rather than StringBuilder/Scanner
-----------------------------+--------------------------
Reporter: karsten | Owner: karsten
Type: enhancement | Status: needs_review
Priority: normal | Milestone:
Component: Onionoo | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
-----------------------------+--------------------------
Changes (by karsten):
* status: new => needs_review
Comment:
Pushed branch
[https://gitweb.torproject.org/user/karsten/onionoo.git/shortlog/refs/heads/task-11577
task-11577 to my public repository] which uses Gson to format the first
four classes UptimeDocument, ClientsDocument, WeightsDocument, and
BandwidthDocument. These changes are relatively easy, because they only
contain ASCII characters.
Review much appreciated!
DetailsDocument and DetailsStatus will be more difficult, because they may
contain UTF-8 characters in platform lines, contact information, city
names, and so on. Previously, we used to escape any non-ASCII character,
but Gson writes UTF-8 and assumes UTF-8 when reading. The biggest issue
here will be transition from existing documents.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11577#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list