Articles → .NET → Paste JSON As Classes In Visual Studio 2013
Paste JSON As Classes In Visual Studio 2013
Create A Sample JSON
{
"Name": "Karan Gupta",
"Age": 28,
"Technology": "JSON",
"Address": {
"City": "Gurgaon",
"State": "Haryana"
}
}
Create A Sample Project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Demo {
public class PasteJsonAsClasses {}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Demo {
}
Paste JSON As Classes
Click to Enlarge
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Demo {
public class Rootobject {
public string Name {
get;
set;
}
public int Age {
get;
set;
}
public string Technology {
get;
set;
}
public Address Address {
get;
set;
}
}
public class Address {
public string City {
get;
set;
}
public string State {
get;
set;
}
}
}