무료 온라인 JSON ~ C# 클래스 생성기
JSON을 붙여넣고 유추된 유형, 중첩 클래스 및 배열용 List<T>를 사용하여 C# 클래스 정의를 가져옵니다. POCO 클래스 또는 C# 9+ 레코드, PascalCase 속성 이름, Newtonsoft.Json 또는 System.Text.Json 직렬화 특성을 선택합니다.
루트 클래스 이름과 선택적 네임스페이스를 설정한 다음 생성된 코드를 .NET 프로젝트에 복사합니다. 모든 변환은 브라우저에서 실행되며 아무것도 업로드되지 않습니다.
Frequently Asked Questions
What is the difference between POCO and record?
POCO (Plain Old CLR Object) classes are mutable reference types with get/set properties - the traditional C# approach. Records (C# 9+) are immutable by default with value-based equality. Use records for DTOs and API models; POCOs when you need mutable objects.
Which JSON library attributes are supported?
Dokall supports Newtonsoft.Json (JsonProperty attributes) and System.Text.Json (JsonPropertyName attributes). Choose based on your project's JSON serializer. System.Text.Json is the modern default in .NET Core 3+.
How are C# property names generated?
Property names use PascalCase by default, following C# conventions. JSON camelCase keys are converted: firstName becomes FirstName. You can set a namespace and root class name before generating.
How are arrays and nested objects handled?
JSON arrays become List<T> with the element type inferred. Nested objects become separate nested classes. Deep nesting produces nested class definitions within the root class.
Can I use this for Entity Framework models?
The generated classes work as DTOs and API models. Entity Framework entities typically need additional attributes (Key, Required, navigation properties) that are not inferred from JSON. Use the output as a starting point and add EF-specific annotations manually.