Sample payloadPaste representative XML or JSON.
Turn XML or JSON samples into clean C# classes.
Generate serializer-ready models with nested types, collections, nullable references and inferred scalar types. The payload stays in your browser and is never sent to a GateSift server.
Local-first System.Text.Json XmlSerializer Downloadable .cs
Generated C#Serializer-ready classes inferred from the sample.
#nullable enable
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace GateSift.Generated;
public sealed class Order
{
[JsonPropertyName("orderId")]
public string OrderId { get; set; } = string.Empty;
[JsonPropertyName("createdAt")]
public DateTimeOffset CreatedAt { get; set; }
[JsonPropertyName("customer")]
public Customer Customer { get; set; } = new();
[JsonPropertyName("lines")]
public List<Line> Lines { get; set; } = [];
[JsonPropertyName("isPriority")]
public bool IsPriority { get; set; }
}
public sealed class Customer
{
[JsonPropertyName("customerId")]
public string CustomerId { get; set; } = string.Empty;
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
}
public sealed class Line
{
[JsonPropertyName("articleId")]
public string ArticleId { get; set; } = string.Empty;
[JsonPropertyName("quantity")]
public int Quantity { get; set; }
[JsonPropertyName("unitPrice")]
public decimal UnitPrice { get; set; }
}
Include optional fields, nested objects and more than one array item when possible.
Samples cannot prove every production value. Confirm dates, numbers and nullability before shipping.
Generated classes are a starting point. Add validation, enums and domain behavior where your solution needs them.