Table of Contents

Class LNURLJsonOptions

Namespace
LNURL
Assembly
LNURL.Core.dll

Provides pre-configured JsonSerializerOptions for System.Text.Json serialization of LNURL types. Includes all custom converters needed for LNURL protocol types such as Uri, BTCPayServer.Lightning.LightMoney, BTCPayServer.Lightning.NodeInfo, NBitcoin.PubKey, and NBitcoin.Crypto.ECDSASignature.

public static class LNURLJsonOptions
Inheritance
LNURLJsonOptions
Inherited Members

Properties

Default

Gets the default JsonSerializerOptions instance, lazily initialized via CreateOptions(). This instance is reused across calls for optimal performance.

public static JsonSerializerOptions Default { get; }

Property Value

JsonSerializerOptions

Methods

AddConverters(JsonSerializerOptions)

Registers all LNURL-specific System.Text.Json converters on the given options instance. Call this method when you need to add LNURL converter support to your own JsonSerializerOptions.

public static void AddConverters(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The JsonSerializerOptions to add converters to.

CreateOptions()

Creates a new JsonSerializerOptions instance configured with camelCase naming, null-value ignoring, case-insensitive property matching, and all LNURL-specific converters.

public static JsonSerializerOptions CreateOptions()

Returns

JsonSerializerOptions

A new configured JsonSerializerOptions instance.