Can't find correct JSON classes - c#

I have next JSON:
[
{
"ApplicationRelations":[
{
"Application":null,
"ApplicationSubcategory":null,
"ApplicationCategory":{
"categoryName":"Default Category",
"id":4
},
"roleOrder":null,
"categoryOrder":null,
"subcategoryOrder":null,
"applicationOrder":null,
"id":6
},
{
"Application":{
"launchUrl":"link",
"trainingUrl":"link",
"installUrl":"link",
"vpn":true,
"overview":"text",
"summary":"text",
"id":12,
"title":"Application"
},
"ApplicationSubcategory":{
"subcategoryName":"Creation",
"id":9
},
"ApplicationCategory":{
"categoryName":"Default Category",
"id":4
},
"roleOrder":15,
"categoryOrder":25,
"subcategoryOrder":35,
"applicationOrder":45,
"id":15
}
],
"roleName":"Role 02",
"roleHeader":"Header of Role 02",
"AnnouncementRelations":[
],
"id":2
}
]
And here are my C# clases:
public class Applications
{
public List<SalesCentralApplicationRelation> salesCentralApplicationRelations { get; set; }
public string RoleName { get; set; }
public string RoleHeader { get; set; }
public List<object> SalesCentralAnnouncementRelations { get; set; }
public int Id { get; set; }
}
public class SalesCentralApplicationRelation
{
public SalesCentralApplication salesCentralApplication { get; set; }
public SalesCentralApplicationSubcategory salesCentralApplicationSubcategory { get; set; }
public SalesCentralApplicationCategory salesCentralApplicationCategory { get; set; }
public int roleOrder { get; set; }
public int categoryOrder { get; set; }
public int subcategoryOrder { get; set; }
public int applicationOrder { get; set; }
public int id { get; set; }
}
public class SalesCentralApplicationCategory
{
public string categoryName { get; set; }
public int id { get; set; }
}
public class SalesCentralApplicationSubcategory
{
public string subcategoryName { get; set; }
public int id { get; set; }
}
public class SalesCentralApplication
{
public string launchUrl { get; set; }
public string trainingUrl { get; set; }
public string installUrl { get; set; }
public bool vpn { get; set; }
public string overview { get; set; }
public string summary { get; set; }
public int id { get; set; }
public string title { get; set; }
}
And my deserialization:
var contents //JSON string above
Applications ApplicationsList = JsonConvert.DeserializeObject<Applications>(contents) as Applications;
And code fails with:
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'App1.MainPage+Applications' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '', line 1, position 1.
Checked my classes with json2csharp - all is fine... where is the problem?

Your json is an array, not a single object. Try this:
var ApplicationsList = JsonConvert.DeserializeObject<List<Applications>>(contents);

Related

Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'ModularWebApp.Models.LutUsers[]'

i have this code , and i'm trying to retrive json data from a c# web api, when ever i try to deserialize the json i'm getting : Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'ModularWebApp.Models.LutUsers[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'content', line 1, position 11.'
i tried a lot of other ways to do and it still not working , any help?
here is my model
[JsonProperty("matricule_agent")]
public string matricule_agent {get; set;}
[JsonProperty("grade_agent")]
public string grade_agent { get; set; }
[JsonProperty("nom_utils")]
public string nom_utils { get; set; }
[JsonProperty("prenom_utils")]
public string prenom_utils { get; set; }
and Here is my controller
public ActionResult LutUser()
{
ViewBag.Message = "Your LookUp Table Page.";
List<LutUsers> lutUsers = new List<LutUsers>();
LutUsers[] Users = new LutUsers[0];
HttpResponseMessage response = client.GetAsync(client.BaseAddress +
"/user/findusers").Result;
//Checking the response is successful or not which is sent using HttpClient
if (response.IsSuccessStatusCode)
{
//Storing the response details recieved from web api
Response.Write("<script>alert('Connection Made successfully!');</script>");
JavaScriptSerializer js = new JavaScriptSerializer();
// Person[] persons = js.Deserialize<Person[]>(json);
string data = response.Content.ReadAsStringAsync().Result;
lutUsers = JsonConvert.DeserializeObject<List<LutUsers>>(data);
// lutUsers = JsonConvert.DeserializeObject<List<LutUsers>>(data);
Response.Write(Users);
} else
{
Response.Write("<script>alert('Connection not made!');</script>");
}
//returning the employee list to view
return View(lutUsers);
}
If this is what your data looks like,
{
"content": [
{
"id_utilisateurs": 1,
"matricule_agent": "BE4",
"nom_utils": "laguerre",
"prenom_utils": "Vellie",
"sexe_utils": "F",
"dat2naiss_utils": "15-12-2020",
"grade_agent": "Agent 4",
"email_utils": "Laguerre.vellie#gmail.com",
"mot2pass_utils": null,
"typ_compte": "agent",
"is_active_utils": 1,
"date_enreg_utils": "05-05-2021 15:55:00",
"affectation": "villate",
"is_first_login": 1,
"mot2pass_utils_defaut": null
}
],
"status": "success"
}
then you need to have the rootObject that has content as a list/array of objects (Content).
public class Rootobject
{
[JsonObject("content")]
public List<Content> Content { get; set; }
[JsonObject("status")]
public string Status { get; set; }
}
public class Content
{
public int id_utilisateurs { get; set; }
public string matricule_agent { get; set; }
public string nom_utils { get; set; }
public string prenom_utils { get; set; }
public string sexe_utils { get; set; }
public string dat2naiss_utils { get; set; }
public string grade_agent { get; set; }
public string email_utils { get; set; }
public object mot2pass_utils { get; set; }
public string typ_compte { get; set; }
public int is_active_utils { get; set; }
public string date_enreg_utils { get; set; }
public string affectation { get; set; }
public int is_first_login { get; set; }
public object mot2pass_utils_defaut { get; set; }
}
Remember, your data is an object that contains content and status as the keys. content's value is an array.. so, deserialize it like this,
var rootObject = JsonConvert.DeserializeObject<Rootobject>(data)
List<Content> lutUsers = rootObject.Content;
Create class
public class ResultData
{
public int id_utilisateurs { get; set; }
public string matricule_agent { get; set; }
public string nom_utils { get; set; }
public string prenom_utils { get; set; }
public string sexe_utils { get; set; }
public DateTime dat2naiss_utils { get; set; }
public string grade_agent { get; set; }
public string email_utils { get; set; }
public string mot2pass_utils { get; set; }
public string typ_compte { get; set; }
public int is_active_utils { get; set; }
public DateTime date_enreg_utils { get; set; }
public string affectation { get; set; }
public int is_first_login { get; set; }
public string mot2pass_utils_defaut { get; set; }
}
and replace
lutUsers = JsonConvert.DeserializeObject<List<LutUsers>>(data);
with
var resultData = JsonConvert.DeserializeObject<List<ResultData>>(data);
It looks like the data you care about is buried in the content array.
Wrap your LutUsers class in a container class with the following properties:
public List<LutUsers> content {get; set;}
public string status {get;set;}

Convert JSON Result to list<>

ERROR
Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the
current JSON object (e.g. {"name":"value"}) into type
'System.Collections.Generic.List`1[RechargePortal.Models.ProviderOperator]'
because the type requires a JSON array (e.g. [1,2,3]) to deserialize
correctly. To fix this error either change the JSON to a JSON array
(e.g. [1,2,3]) or change the deserialized type so that it is a normal
.NET type (e.g. not a primitive type like integer, not a collection
type like an array or List) that can be deserialized from a JSON
object. JsonObjectAttribute can also be added to the type to force it
to deserialize from a JSON object. Path 'providers', line 1, position
13.'
List<ProviderOperator> GetProvideOperator(string service)
{
string json = new System.Net.WebClient().DownloadString("URL");
List<ProviderOperator> ob = new List<ProviderOperator>();
ob = JsonConvert.DeserializeObject<List<ProviderOperator>>(json);
ob = ob.Where(x => x.Service.Equals(service)).ToList();
return ob;
}
JSON RESULT
{
"providers":[
{
"provider_id":0,
"provider_name":"PAY2ALL",
"provider_code":"PAY2ALL",
"service_id":10,
"service":"Pay2All Cash",
"provider_image":"",
"status":"Success"
},
{
"provider_id":1,
"provider_name":"AIRTEL",
"provider_code":"A",
"service_id":1,
"service":"Recharge",
"provider_image":"provider_icons\/airtel.png",
"status":"Success"
},
{
"provider_id":2,
"provider_name":"VODAFONE",
"provider_code":"V",
"service_id":1,
"service":"Recharge",
"provider_image":"provider_icons\/vodafone.png",
"status":"Success"
}
]
}
Model
public class ProviderOperator
{
public string Provider_id { get; set; }
public string Provider_name { get; set; }
public string Provider_code { get; set; }
public string Service { get; set; }
public string Provider_image { get; set; }
public string Status { get; set; }
}
You should try following class:
public class ProviderOperator
{
public List<Provider> providers { get; set; }
}
public class Provider
{
public int provider_id { get; set; }
public string provider_name { get; set; }
public string provider_code { get; set; }
public int service_id { get; set; }
public string service { get; set; }
public string provider_image { get; set; }
public string status { get; set; }
}
var ob = JsonConvert.DeserializeObject<ProviderOperator>(json);
Output:
Your Json Result is in different format and the class structure you are using
to parse json is in different format.
You need to create two separate classes as follows
Class Structure
public class ProviderOperator
{
public List<ProviderInfo> providers { get; set; }
}
public class ProviderInfo
{
public int provider_id { get; set; }
public string provider_name { get; set; }
public string provider_code { get; set; }
public int service_id { get; set; }
public string service { get; set; }
public string provider_image { get; set; }
public string status { get; set; }
}
Parsing Response
var result = JsonConvert.DeserializeObject<ProvderOperator>(json);

Linq transformation help needed

I've got a List of this object:
public class WebinarAttendeesList {
public int wa_id { get; set; }
public int PID { get; set; }
public string FullName { get; set; }
public string Email { get; set; }
public string JoinTime { get; set; }
public string TimeInSession { get; set; }
public string LeaveTime { get; set; }
public int FirstPollCount { get; set; }
public int SecondPollCount { get; set; }
public int AttendedWebinar { get; set; }
public int Makeup { get; set; }
public string Comments { get; set; }
public string RegistrantKey { get; set; }
public string webinarKey { get; set; }
}
I'm using this Linq code:
var webinars = new
{
Webinars = r.GroupBy(x => new { x.PID, x.FullName }).
Select(y => new
{
PID = y.Key.PID,
FullName = y.Key.FullName,
AffReceived = 0,
Attendances = y.Select(z => new
{
WebinarKey = z.webinarKey,
RegistrantKey = z.RegistrantKey,
TimeInSession = z.TimeInSession,
FirstPollCount = z.FirstPollCount,
SecondPollCount = z.SecondPollCount,
AttendedWebinar = z.AttendedWebinar
})
})
};
string json = JsonConvert.SerializeObject(webinars);
to transform the List to JSON. But, I think I'd rather
have it transformed into a List<FinalWebinarAttendeesList> (see below
definition). The JSON that it produces looks correct and passes lint.
When I try to do this:
List<FinalWebinarAttendeesList> fl = JsonConvert.DeserializeObject<List<FinalWebinarAttendeesList>>(json);
I get an error:
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type
'System.Collections.Generic.List`1[WebinarProject.Models.FinalWebinarAttendeesList]'
because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or
change the deserialized type so that it is a normal .NET type (e.g. not a
primitive type like integer, not a collection type like an array or List<T>)
that can be deserialized from a JSON object. JsonObjectAttribute can also be
added to the type to force it to deserialize from a JSON object. Path
'Webinars', line 1, position 12.
How can I either transform this directly into the object I want, or be able to deserialize it into the object I want?
FinalWebinarAttendeesList definition:
public class FinalWebinarAttendeesList
{
public FinalWebinar Webinars {get; set; }
}
public class FinalWebinar
{
public int PtID { get; set; }
public string FullName { get; set; }
public int AffReceived { get; set; }
public List<FinalWebinarAttendee> Attendances { get; set; }
}
public class FinalWebinarAttendee
{
public string RegistrantKey { get; set; }
public string TimeInSession { get; set; }
public int FirstPollCount { get; set; }
public int SecondPollCount { get; set; }
public int AttendedWebinar { get; set; }
}
I created a json sample output using random data and and I found that you are trying to deserialize the json with the wrong object.
Json output:
{"Webinars":[{"PID":453,"FullName":"jdis","Attendances":[{"WebinarKey":"kdnsaod","RegistrantKey":"udhaso","TimeInSession":"hdija","FirstPollCount":45,"SecondPollCount":45,"AttendedWebinar":0}]}]}
The object has de following structure:
public class Attendance
{
public string WebinarKey { get; set; }
public string RegistrantKey { get; set; }
public string TimeInSession { get; set; }
public int FirstPollCount { get; set; }
public int SecondPollCount { get; set; }
public int AttendedWebinar { get; set; }
}
public class Webinar
{
public int PID { get; set; }
public string FullName { get; set; }
public List<Attendance> Attendances { get; set; }
}
public class RootObject
{
public List<Webinar> Webinars { get; set; }
}
And for Deserializing the object:
var result = JsonConvert.DeserializeObject<RootObject>(json);
You created only one Webinar instance, but you are trying to deserialize a list of Webinars. Try:
FinalWebinarAttendeesList fl = JsonConvert.DeserializeObject<FinalWebinarAttendeesList>(json);

Deserealization not working properly

I've create a class for deserialize this JSON
public class Self
{
public string href { get; set; }
}
public class Team
{
public string href { get; set; }
}
public class Links
{
public Self _self { get; set; }
public Team team { get; set; }
}
public class Player
{
public int id { get; set; }
public string name { get; set; }
public string position { get; set; }
public int jerseyNumber { get; set; }
public string dateOfBirth { get; set; }
public string nationality { get; set; }
public string contractUntil { get; set; }
public string marketValue { get; set; }
}
public class RootObject
{
public Links _links { get; set; }
public int count { get; set; }
public List<Player> players { get; set; }
}
public struct Player_Struct
{
public string id;
public string name;
public string position;
public int jerseyNumber;
public string dateOfBirth;
public string nationality;
public string contractUntil;
public string marketValue;
}
So I made a function to create an HttpRequest and the relative object:
string requestUrl = teams.link_teams;
string responseText = parser.Request(requestUrl);
var obj = JsonConvert.DeserializeObject<Players.RootObject>(responseText);
Now the problem's that the compiler return this exception:
Unhandled exception 'Newtonsoft.Json.JsonSerializationException' in Newtonsoft.Json.dll
Ulteriori informazioni: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'SF_DebugProject.API.Players+Links' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '_links', line 1, position 11.
So with the fix hint I've tried to repair the error change the object into:
List<Players.RootObject> obj = JsonConvert.DeserializeObject<List<Players.RootObject>>(responseText);
but in this way I can't see any attribute of the rootobject when I do the foreach. What I doing wrong?
From what I understand you want to deserialize a JSON string in a RootObject that contains a list of players.
The classes should look like this:
public class Rootobject
{
public _Links _links { get; set; }
public int count { get; set; }
public Player[] players { get; set; }
}
public class _Links
{
public _Self _self { get; set; }
public Team team { get; set; }
}
public class _Self
{
public string href { get; set; }
}
public class Team
{
public string href { get; set; }
}
public class Player
{
public int id { get; set; }
public string name { get; set; }
public string position { get; set; }
public int jerseyNumber { get; set; }
public string dateOfBirth { get; set; }
public string nationality { get; set; }
public string contractUntil { get; set; }
public string marketValue { get; set; }
}
So what you should do is something like the following :
var obj = JsonConvert.DeserializeObject<RootObject>(response);
foreach(var player in obj.players)
{
// some stuff
}

How to parse this JSON

This is my Json
{
"count":2,
"threads":[
{
"thread_id":346568,
"node_id":75,
"title":"Gi\u1ea3i ph\u00e1p th\u1ed5i bay m\u00f9i h\u00f4i n\u00e1ch t\u1ef1 tin h\u01a1n trong ng\u00e0y h\u00e8",
"reply_count":0,
"view_count":2,
"user_id":339597,
"username":"giangdaigia20",
"post_date":1434435728,
"sticky":0,
"discussion_state":"visible",
"discussion_open":1,
"discussion_type":"",
"first_post_id":2468576,
"first_post_likes":0,
"last_post_date":1434435728,
"last_post_id":2468576,
"last_post_user_id":339597,
"last_post_username":"giangdaigia20",
"prefix_id":2,
"block_adsense":0,
"thumbnail_url":"",
"thumbnail_cache_waindigo":"a:8:{s:13:\"thumbnail_url\";s:69:\"http:\/\/trihoinach.org\/wp-content\/uploads\/2015\/04\/Tri-hoi-nach5555.jpg\";s:12:\"thumbnailUrl\";s:69:\"http:\/\/trihoinach.org\/wp-content\/uploads\/2015\/04\/Tri-hoi-nach5555.jpg\";s:5:\"width\";s:2:\"48\";s:6:\"height\";s:2:\"48\";s:9:\"max-width\";s:2:\"48\";s:10:\"max-height\";s:2:\"48\";s:17:\"vertical-position\";i:0;s:19:\"horizontal-position\";i:0;}",
"custom_fields":[
],
"socia l_forum_id":0,
"live_waindigo":0,
"current_event_id_waindigo":0,
"google_event_id_waindigo":"",
"social_forum_title":null,
"social_forum_user_id":null,
"social_forum_style_id":null,
"absolute_url":"http:\/\/dev.handheld.vn\/threads\/346568\/"
},
{
"thread_id":346567,
"node_id":85,
"title":"Nh\u1edd c\u00e1c b\u00e1c t\u01b0 v\u1ea5n d\u00f9m em 2 c\u00e1i \u0111\u1ed3ng h\u1ed3 Citizen n\u00e0y",
"reply_count":1,
"view_count":4,
"user_id":156695,
"username":"gamap",
"post_date":1434430984,
"sticky":0,
"discussion_state":"visible",
"discussion_open":1,
"discussion_type":"",
"first_post_id":2468575,
"first_post_likes":0,
"last_post_date":1434443484,
"last_post_id":2468577,
"last_post_user_id":156695,
"last_post_username":"gamap",
"prefix_id":95,
"block_adsense":0,
"thumbnail_url":"",
"thumbnail_cache_waindigo":"a:8:{s:13:\"thumbnail_url\";s:86:\"http:\/\/i16.photobucket.com\/albums\/b3\/vozmember\/shopdongho\/citizen\/real\/BU0011-55Aa.jpg\";s:12:\"thumbnailUrl\";s:86:\"http:\/\/i16.photobucket.com\/albums\/b3\/vozmember\/shopdongho\/ci tizen\/real\/BU0011-55Aa.jpg\";s:5:\"width\";s:2:\"48\";s:6:\"height\";s:2:\"48\";s:9:\"max-width\";s:2:\"48\";s:10:\"max-height\";s:2:\"48\";s:17:\"vertical-position\";i:0;s:19:\"horizontal-position\";i:0;}",
"custom_fields":[
],
"social_forum_id":0,
"live_waindigo":0,
"current_event_id_waindigo":0,
"google_event_id_waindigo":"",
"social_forum_title":null,
"social_forum_user_id":null,
"social_forum_style_id":null,
"absolute_url":"http:\/\/dev.handheld.vn\/threads\/34656 7\/"
}
]
}
This is my class define
class Thread_Result
{
public string count { get; set; }
[JsonProperty("threads")]
public Threads threads { get; set; }
}
class Threads
{
[JsonProperty("thread_id")]
public string thread_id { get; set; }
[JsonProperty("node_id")]
public string node_id { get; set; }
[JsonProperty("title")]
public string title { get; set; }
[JsonProperty("reply_count")]
public string reply_count { get; set; }
[JsonProperty("view_count")]
public string view_count { get; set; }
[JsonProperty("user_id")]
public string user_id { get; set; }
[JsonProperty("post_date")]
public string post_date { get; set; }
[JsonProperty("sticky")]
public string sticky { get; set; }
[JsonProperty("discussion_state")]
public string discussion_state { get; set; }
[JsonProperty("discussion_open")]
public string discussion_open { get; set; }
[JsonProperty("discussion_type")]
public string discussion_type { get; set; }
[JsonProperty("first_post_id")]
public string first_post_id { get; set; }
[JsonProperty("first_post_likes")]
public string first_post_likes { get; set; }
[JsonProperty("last_post_date")]
public string last_post_date { get; set; }
[JsonProperty("last_post_id")]
public string last_post_id { get; set; }
[JsonProperty("last_post_user_id")]
public string last_post_user_id { get; set; }
[JsonProperty("last_post_username")]
public string last_post_username { get; set; }
[JsonProperty("prefix_id")]
public string prefix_id { get; set; }
[JsonProperty("block_adsense")]
public string block_adsense { get; set; }
[JsonProperty("thumbnail_url")]
public string thumbnail_url { get; set; }
[JsonProperty("thumbnail_cache_waindigo")]
public string thumbnail_cache_waindigo { get; set; }
[JsonProperty("custom_fields")]
public string custom_fields { get; set; }
[JsonProperty("social_forum_id")]
public string social_forum_id { get; set; }
[JsonProperty("live_waindigo")]
public string live_waindigo { get; set; }
[JsonProperty("current_event_id_waindigo")]
public string current_event_id_waindigo { get; set; }
[JsonProperty("google_event_id_waindigo")]
public string google_event_id_waindigo { get; set; }
[JsonProperty("social_forum_title")]
public string social_forum_title { get; set; }
[JsonProperty("social_forum_user_id")]
public string social_forum_user_id { get; set; }
[JsonProperty("social_forum_style_id")]
public string social_forum_style_id { get; set; }
[JsonProperty("absolute_url")]
public string absolute_url { get; set; }
}
But i got error
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[AppHandHeld.Class.Threads]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'count', line 1, position 9.
This is a problem for a start:
[JsonProperty("threads")]
public Threads threads { get; set; }
Which to the parser looks like:
{
"threads": { <single thread object> }
}
It needs to be:
[JsonProperty("threads")]
public Threads[] threads { get; set; }
Which looks like:
{
"threads": [<array of thread objects>]
}
Which is how it is in the JSON sample you provided. Then you also have:
[JsonProperty("custom_fields")]
public string custom_fields { get; set; }
Which would mean in the JSON:
{
"custom_fields": "<some string>"
}
However in the JSON it is in fact:
{
"custom_fields": [<an array>]
}
Which should be something like:
[JsonProperty("custom_fields")]
public string[] custom_fields { get; set; }
And again you have in Thread_Result:
[JsonProperty("count")]
public string Count { get; set; }
This should be:
[JsonProperty("count")]
public int Count { get; set; }
In fact you've done that for pretty much all of your numeric values, try and use the correct value types and let the JSON parser do the parsing for you.
Start fixing these basic issues and see how you get on.

Categories

Resources