Matthew Badger 7c5ee47e68
Added support for infinite and nan floats/doubles (#215)
- Added support for the custom double values from
   the protobuf json spec: "Infinity", "-Infinity", and "NaN"
- Added `infinite_floats` test data
- Updated Message.__eq__ to consider nan values
   equal
- Updated `test_message_json` and
   `test_binary_compatibility` to replace NaN float
   values in dictionaries before comparison
   (because two NaN values are not equal)
2021-04-02 15:15:28 +02:00

10 lines
186 B
JSON

{
"positive": "Infinity",
"negative": "-Infinity",
"nan": "NaN",
"three": 3.0,
"threePointOneFour": 3.14,
"negThree": -3.0,
"negThreePointOneFour": -3.14
}