microsoft/ApplicationInsights-Kubernetes

Drop the direct dependency on Newtonsoft.Json

xiaomi7732 opened this issue · 2 comments

Drop the direct dependency on Newtonsoft.Json

Dropping it from our codebase is easy.
However, Newtonsoft.Json has been dependent of KubernetesClient/6.0.26. The chain looks like:

MS.ApplicationInsights.Kubernetes -> KubernetesClient/6.0.26 -> Microsoft.Rest.ClientRuntime/2.3.23 -> Newtonsoft.Json/10.0.3

Details:

        "KubernetesClient/6.0.26": {
        "type": "package",
        "dependencies": {
...
          "Microsoft.Rest.ClientRuntime": "2.3.23",
...
        },
      "Microsoft.Rest.ClientRuntime/2.3.23": {
        "type": "package",
        "dependencies": {
          "Newtonsoft.Json": "10.0.3"
        },
        ...
      },

A potential alternative would be to bump up version of KubernetesClient to a newer version (7.x), which stopped relying on Microsoft.Rest.ClientRuntime. Need to look into the potential implications.

Another alternative considered was to request Microsoft.Rest.ClientRuntime to drop dependency on NewtonsoftJson, which doesn't seem to happen. See details in conversation: Azure/azure-sdk-for-net#30957.