Table of Contents

Class JsonMasking

Namespace
GroupeIsa.Neos.Shared.Masking
Assembly
GroupeIsa.Neos.Shared.dll

Masks the values of the properties marked with MaskedPropertyAttribute in the JSON that leaves the server for a user: API responses, MCP tools and AI functions.

public static class JsonMasking
Inheritance
JsonMasking
Inherited Members

Remarks

The other JSON exchanges (inter-cluster request bodies, SignalR, state storage) carry values that the server reads back or saves: they never use it.

Properties

Neos

Gets the default Neos JSON serializer options, with the masked values masked.

public static JsonSerializerOptions Neos { get; }

Property Value

JsonSerializerOptions

Methods

MaskProperties(JsonTypeInfo)

Replaces the getter of every masked string property of a JSON contract by one that returns the masked value.

public static void MaskProperties(JsonTypeInfo typeInfo)

Parameters

typeInfo JsonTypeInfo

The JSON contract of a type.

WithMasking(JsonSerializerOptions)

Creates a copy of JSON serializer options that masks the masked values.

public static JsonSerializerOptions WithMasking(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The options to copy.

Returns

JsonSerializerOptions

The copied options.