Provides instructions for using ABP's IJsonSerializer with System.Text.Json, including camelCase/indented flags, date formats, and converters. Excludes ASP.NET Core MVC JSON and cache serialization.
Ships in abp-infrastructure. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use IJsonSerializer in reusable application and infrastructure code. Volo.Abp.Json depends on Volo.Abp.Json.SystemTextJson, so System.Text.Json is the default provider while callers remain provider-independent.
Type.IJsonSerializer.JsonOptions separately; that is ASP.NET Core HTTP formatter configuration and is out of scope here.IJsonSerializer is synchronous and exposes three operations:
string Serialize(object obj, bool camelCase = true, bool indented = false);
T Deserialize<T>(string jsonString, bool camelCase = true);
object Deserialize(Type type, string jsonString, bool camelCase = true);
public class PayloadStore : ITransientDependency
{
private readonly IJsonSerializer _jsonSerializer;
public PayloadStore(IJsonSerializer jsonSerializer)
{
_jsonSerializer = jsonSerializer;
}
public string Serialize(OrderPayload payload)
{
return _jsonSerializer.Serialize(payload);
}
public OrderPayload Deserialize(string json)
{
return _jsonSerializer.Deserialize<OrderPayload>(json);
}
}
camelCase defaults to true; indented defaults to false. Pass camelCase: false when property names must retain their CLR names.
AbpSystemTextJsonSerializerOptions.JsonSerializerOptions starts with JsonSerializerDefaults.Web, skips comments, and allows trailing commas. The ABP module supplies an unsafe-relaxed encoder only when no encoder was explicitly set, then adds ABP converters and an AbpDefaultJsonTypeInfoResolver.
using System.Text.Json.Serialization;
using Volo.Abp.Json.SystemTextJson;
Configure<AbpSystemTextJsonSerializerOptions>(options =>
{
options.JsonSerializerOptions.DefaultIgnoreCondition =
JsonIgnoreCondition.WhenWritingNull;
});
The serializer clones these global options for each camelCase/indented combination, overriding PropertyNamingPolicy and WriteIndented for the current call.
AbpJsonOptions has two properties:
InputDateTimeFormats: an empty List<string> by default; add exact accepted input formats.OutputDateTimeFormat: null by default; null or empty uses the provider's default output format.using Volo.Abp.Json;
Configure<AbpJsonOptions>(options =>
{
options.InputDateTimeFormats.Add("yyyy-MM-dd HH:mm:ss");
options.OutputDateTimeFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'";
});
The ABP DateTime converters use these values with CultureInfo.CurrentUICulture. Note the two layers behave differently. The default System.Text.Json provider registers its date converters with SkipDateTimeNormalization(), so the general path does not call Clock.Normalize — a value with a specified Kind passes through unchanged. The converter still handles specific cases: a DateTime with Unspecified kind, under a clock that supports multiple timezones and a current tenant timezone, is converted from that timezone to UTC. A literal Z format does not itself convert a value to UTC; choose the format together with the application's clock policy.
Configuring AbpSystemTextJsonSerializerOptions or AbpJsonOptions does not configure ASP.NET Core MVC's input/output formatter. Configure Microsoft ASP.NET Core JsonOptions separately when HTTP contracts must change.
DateTime, and extra properties.Type overload returns the expected concrete type.IJsonSerializer and ASP.NET Core endpoint JSON separately; they use separate option objects.System.Text.Json.JsonSerializer directly in provider-independent code — it bypasses ABP's abstraction and converters.indented is a global setting — it is a per-call argument on IJsonSerializer.Serialize.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
abp, json-serialization, system-text-json, serialization, abp-framework
/abp-infrastructure:serialize-jsonfrom abp-infrastructure
npx claudepluginhub abpframework/abp-skills --plugin abp-infrastructure16 skills in this plugin
/check-simple-stateComposable ABP simple-state conditions on definitions and UI state objects. USE FOR: ISimpleStateChecker, ISimpleStateCheckerManager, permission/feature/authentication conditions on IHasSimpleStateCheckers. DO NOT USE FOR: tenant/edition feature values (manage-settings-and-features); permission authorization of a service call (permissions-and-authorization); startup-time module capabilities (toggle-global-features)./configure-audit-loggingABP audit logging: per-request log of requests, actions, entity change history, exceptions. USE FOR: enabling/disabling auditing, GET request logging, entity change history, AuditLogContributors, ignoring types, [Audited]/[DisableAuditing], manual scopes with IAuditingManager. DO NOT USE FOR: general application/UI logging or Serilog (configure-logging); setting/feature values (manage-settings-and-features); background jobs/workers/handlers (background-jobs-and-events)./configure-loggingABP startup, runtime, exception logging, and the startup-template Serilog bridge. USE FOR: typed ILogger in ABP services; IInitLoggerFactory/GetInitLogger startup buffering; ABP exceptions via LogException; Serilog via UseSerilog. DO NOT USE FOR: audit-log persistence and entity history (configure-audit-logging); distributed traces and metrics (out of scope, wire the OpenTelemetry .NET SDK directly); exception-to-HTTP response details (handle-validation-and-errors).Other plugins' skills for the same job