forked from EdTrench/ASPWebAPIExample
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRoot.cs
More file actions
39 lines (32 loc) · 937 Bytes
/
Copy pathRoot.cs
File metadata and controls
39 lines (32 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// JSON C# Class Generator
// http://at-my-window.blogspot.com/?page=json-class-generator
using System;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;
using MyProject.JsonTypes;
namespace MVC4BundleUI
{
internal class Root
{
public Root(string json)
: this(JObject.Parse(json))
{
}
private JObject __jobject;
public Root(JObject obj)
{
this.__jobject = obj;
}
[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
private Categories _categories;
public Categories Categories
{
get
{
if(_categories == null)
_categories = JsonClassHelper.ReadStronglyTypedObject<Categories>(JsonClassHelper.GetJToken<JObject>(__jobject, "categories"));
return _categories;
}
}
}
}