Table of Contents

Class RDCorePlatformJson

Namespace
RDCore.SDK.Client
Assembly
RDCore.SDK.Protocol.dll

The System.Text.Json settings that write and read the rdcore/* messages of this package exactly as the platform's own processes do.

public static class RDCorePlatformJson
Inheritance
RDCorePlatformJson
Inherited Members

Remarks

A client that speaks to the language server with this package alone - an IDE add-in over its host's message channel, an editor extension - serializes the parameters it sends and deserializes the results it receives with these options, and the language server reads and writes the same JSON.

The wire they produce:

  • member names in camelCase, read regardless of case;
  • enumerations as their numeric value, except where a type says otherwise (RubberduckIndenterSettingsSource is written by name);
  • null members written as null, except the capability groups of CorePlatformClientCapabilities, which are left out;
  • a Uri as its original text, read back as an absolute URI wherever one can be made of it (a rooted path, on any platform), and SourcePosition as an LSP position ({ "line": 0, "character": 0 });
  • SourceRange as an LSP range with one more member, isEmpty, which a reader ignores: { "start": { … }, "end": { … }, "isEmpty": false }.

The instance is read-only: copy it (new JsonSerializerOptions(RDCorePlatformJson.Options)) to add a converter of your own.

Properties

Options

The options every rdcore/* message of this package is written and read with.

public static JsonSerializerOptions Options { get; }

Property Value

JsonSerializerOptions