📋 Copy JSON, Paste C# Classes
API returns JSON? Need C# model? Edit → Paste Special → Paste JSON as Classes generates everything. No manual typing.
📝 How to Use
1. Copy JSON from browser / API response
2. In Visual Studio: Edit → Paste Special → Paste JSON as Classes
3. VS generates proper C# classes with:
- Properties with correct types
- JsonPropertyName attributes
- Nested classes for nested objects
- Array handling
Example input:
{
"id": 1,
"name": "Alice",
"email": "alice@example.com",
"address": {
"city": "New York",
"zip": "10001"
}
}
VS generates:
public class Root
{
public int Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
public Address Address { get; set; }
}
public class Address
{
public string City { get; set; }
public string Zip { get; set; }
}
✅ Also Works For
- Paste XML as Classes: Generate from XML samples
- Perfect for REST API integration
- Saves hours of manual model creation
- Handles complex nested structures
“API documentation had JSON sample. Copied, pasted as classes, 100 lines of models generated instantly. Saved 30 minutes of typing. VS feature I never knew existed.”
