Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to access GUI from another thread? PinPopular
Luc Pattyn11-Feb-21 11:29
sitebuilderLuc Pattyn11-Feb-21 11:29 
GeneralRe: How to access GUI from another thread? Pin
Eddy Vluggen11-Feb-21 14:01
professionalEddy Vluggen11-Feb-21 14:01 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 18:18
Alex Dunlop11-Feb-21 18:18 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 19:39
Alex Dunlop11-Feb-21 19:39 
AnswerMessage Closed Pin
11-Feb-21 14:18
professionalEddy Vluggen11-Feb-21 14:18 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 18:16
Alex Dunlop11-Feb-21 18:16 
QuestionJsonConvert.DeserializeObject Pin
Member 1449252210-Feb-21 21:43
Member 1449252210-Feb-21 21:43 
AnswerRe: JsonConvert.DeserializeObject Pin
OriginalGriff10-Feb-21 22:05
mveOriginalGriff10-Feb-21 22:05 
Your JSON does not match the class, which is probably why you get a problem. If I run your JSON through a class creator (Convert JSON to C# Classes Online - Json2CSharp Toolkit[^]) then what I get is three classes:
// Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse); 
    public class _201506301400001    {
        public string contacto { get; set; } 
        public string telefono { get; set; } 
        public string email { get; set; } 
        public string notas { get; set; } 
    }

    public class _201506301400011    {
        public string contacto { get; set; } 
        public string telefono { get; set; } 
        public string email { get; set; } 
        public string notas { get; set; } 
    }

    public class Root    {
        [JsonProperty("20150630140000#1")]
        public _201506301400001 _201506301400001 { get; set; } 
        [JsonProperty("20150630140001#1")]
        public _201506301400011 _201506301400011 { get; set; } 
    }
Which is what I would expect from that: two different classes with identical content but different names!

I'd start by looking at the data source - I'd expect an array of JSON data containing two elements, not two individual items.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

AnswerRe: JsonConvert.DeserializeObject Pin
Member 1449252211-Feb-21 4:13
Member 1449252211-Feb-21 4:13 
AnswerRe: JsonConvert.DeserializeObject Pin
James Curran11-Feb-21 23:58
James Curran11-Feb-21 23:58 
GeneralRe: JsonConvert.DeserializeObject Pin
Member 1449252212-Feb-21 7:08
Member 1449252212-Feb-21 7:08 
QuestionBackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 4:13
Alex Dunlop10-Feb-21 4:13 
AnswerRe: BackGroundWorker gives runtime error Pin
OriginalGriff10-Feb-21 4:36
mveOriginalGriff10-Feb-21 4:36 
GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 4:44
Alex Dunlop10-Feb-21 4:44 
GeneralRe: BackGroundWorker gives runtime error Pin
OriginalGriff10-Feb-21 5:00
mveOriginalGriff10-Feb-21 5:00 
GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 5:03
Alex Dunlop10-Feb-21 5:03 
GeneralRe: BackGroundWorker gives runtime error Pin
OriginalGriff10-Feb-21 5:43
mveOriginalGriff10-Feb-21 5:43 
GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop12-Feb-21 1:44
Alex Dunlop12-Feb-21 1:44 
GeneralRe: BackGroundWorker gives runtime error Pin
OriginalGriff12-Feb-21 2:11
mveOriginalGriff12-Feb-21 2:11 
GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop12-Feb-21 6:03
Alex Dunlop12-Feb-21 6:03 
AnswerRe: BackGroundWorker gives runtime error Pin
Ralf Meier10-Feb-21 4:48
mveRalf Meier10-Feb-21 4:48 
GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 4:57
Alex Dunlop10-Feb-21 4:57 
GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 7:47
Alex Dunlop10-Feb-21 7:47 
GeneralRe: BackGroundWorker gives runtime error Pin
Luc Pattyn10-Feb-21 9:26
sitebuilderLuc Pattyn10-Feb-21 9:26 
GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 16:49
Alex Dunlop10-Feb-21 16:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.