FAForever/server

Maximum precision for float serialization

オープン

#875 opened on 2022/01/01

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Python (79 件のフォーク)auto 404
good first issue

Repository metrics

Stars
 (72 個のスター)
PR merge metrics
 (PR metrics pending)

説明

We should explicitly set the number of decimal places to use for float serialization. This will probably have to be done by subclassing the default JSONEncoder and using a custom float wrapper that knows how to serialize itself with a certain precision. It might also be possible using the standard library Decimal type. We should make sure to consider the impact on the performance of serialization.

https://docs.python.org/3.9/library/json.html#json.JSONEncoder

Fields affected:

  • queue_pop_time_delta in matchmaker_info

コントリビューターガイド