[ VM ] Remove hard coded line and token numbers from JSON_JSONStream_DartObject

Fixes https://github.com/dart-lang/sdk/issues/51389

TEST=json_test.cc

Change-Id: I303c5981d8fd43d82e2498410f6d2abc6b3f5bc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364221
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc
index e01bc70..0a67ffe9 100644
--- a/runtime/vm/json_test.cc
+++ b/runtime/vm/json_test.cc
@@ -188,21 +188,23 @@
   ElideJSONSubstring("classes", json_str, buffer);
   ElideJSONSubstring("libraries", buffer, buffer);
   ElideJSONSubstring("objects", buffer, buffer);
+  ElideJSONSubstring("line", buffer, buffer);
+  ElideJSONSubstring("column", buffer, buffer);
+  StripTokenPositions(buffer);
+
   EXPECT_STREQ(
       "[{\"type\":\"@Instance\",\"_vmType\":\"null\",\"class\":{\"type\":\"@"
       "Class\",\"fixedId\":true,\"id\":\"\",\"name\":\"Null\",\"location\":{"
       "\"type\":\"SourceLocation\",\"script\":{\"type\":\"@Script\","
-      "\"fixedId\":true,\"id\":\"\",\"uri\":\"dart:core\\/null.dart\",\"_"
-      "kind\":\"kernel\"},\"tokenPos\":925,\"endTokenPos\":1171,\"line\":23,"
-      "\"column\":1},\"library\":{"
+      "\"fixedId\":true,\"id\":\"\",\"uri\":\"dart:core\\/null.dart\","
+      "\"_kind\":\"kernel\"}},\"library\":{"
       "\"type\":\"@Library\",\"fixedId\":true,\"id\":\"\",\"name\":\"dart."
       "core\",\"uri\":\"dart:core\"}},\"kind\":\"Null\",\"fixedId\":true,"
       "\"id\":\"\",\"valueAsString\":\"null\"},{\"object_key\":{\"type\":\"@"
       "Instance\",\"_vmType\":\"null\",\"class\":{\"type\":\"@Class\","
       "\"fixedId\":true,\"id\":\"\",\"name\":\"Null\",\"location\":{\"type\":"
       "\"SourceLocation\",\"script\":{\"type\":\"@Script\",\"fixedId\":true,"
-      "\"id\":\"\",\"uri\":\"dart:core\\/null.dart\",\"_kind\":\"kernel\"},"
-      "\"tokenPos\":925,\"endTokenPos\":1171,\"line\":23,\"column\":1},"
+      "\"id\":\"\",\"uri\":\"dart:core\\/null.dart\",\"_kind\":\"kernel\"}},"
       "\"library\":{\"type\":\"@"
       "Library\",\"fixedId\":true,\"id\":\"\",\"name\":\"dart.core\",\"uri\":"
       "\"dart:core\"}},\"kind\":\"Null\",\"fixedId\":true,\"id\":\"\","