Formatierer & Code
JSON zu C#-Klasse
Generate POCO classes from a JSON sample.
Anmerkung der Redaktion
Understanding · Two libraries, one mental model.
Dieses ausführliche Kapitel ist derzeit nur auf Englisch verfügbar. Das Konvertierungstool oben funktioniert in Ihrer Sprache; der lange Erklärtext wurde noch nicht übersetzt.
Häufig gestellte Fragen
Quick answers.
›How does the tool handle nested objects?
The generator recursively scans your JSON structure to create separate, linked classes for each nested object level. It ensures that complex hierarchies are mapped to a structured class model.
›What attributes are added to the classes?
The tool can include `[JsonPropertyName]` or `[JsonProperty]` attributes to ensure proper deserialization when JSON keys use different naming conventions than C# properties. This supports both System.Text.Json and Newtonsoft.Json libraries.
›How are data types determined?
It infers types based on the JSON values: integers become `int` or `long`, decimals become `double` or `decimal`, and ISO dates are mapped to `DateTime`. If a value is null, the tool defaults to `object` or a nullable type.
›Is my data sent to any external server?
No. The conversion logic is executed entirely within your web browser. Neither your JSON structure nor the resulting C# code is transmitted or stored on any server.
Andere suchten auch nach
Verwandte Tools
More in this room.
- JSON zu TypeScript-InterfaceTypen aus einem JSON-Beispiel ableiten und TS-Interfaces ausgeben.
- JSON zu Java POJOEin Java POJO aus einem JSON-Beispiel erstellen.
- JSON zu Python DataclassTyp-hinzugefügte Dataclasses (mit optionalem Pydantic) aus JSON.
- JSON zu Go StructIdiomatische Go-Structs mit `json:` Tags.
- JSON zu Kotlin Data ClassPrägnante Data Classes für jedes JSON-Beispiel.
- JSON zu JSON-SchemaEin JSON-Schema-Dokument aus einem Beispiel ableiten.