Index: pkg/json/lib/json.dart |
diff --git a/pkg/json/lib/json.dart b/pkg/json/lib/json.dart |
index f7063382c6ddb05aa8a4ec6cfa7da1c985a8d960..4c6732275c515dae62587880cc3877274003a195 100644 |
--- a/pkg/json/lib/json.dart |
+++ b/pkg/json/lib/json.dart |
@@ -769,7 +769,7 @@ class _JsonStringifier { |
*/ |
bool stringifyJsonValue(final object) { |
if (object is num) { |
- // TODO: use writeOn. |
+ if (!object.isFinite) return false; |
sink.write(numberToString(object)); |
return true; |
} else if (identical(object, true)) { |