gdm85/go-rencode

ToSnakeCase breaks TorrentInfo deserialization

ailox opened this issue · 0 comments

ailox commented

From 9f30234 the ToSnakeCase method serializes some attributes wrongly, most importantly the all-caps "ETA" attribute, thus breaking the deserialization of "TorrentInfo" struct, which in turn breaks the TorrentsStatus and TorrentStatus methods downstream in go-libdeluge.

For input 'ETA' got 'e_t_a' (expected 'eta')
For input 'JSONData' got 'j_s_o_n_data' (expected 'json_data')
For input 'entityID' got 'entity_i_d' (expected 'entity_id')
For input 'AAArgh' got 'a_a_argh' (expected 'aa_argh')

This is fixed by #4