Click here to Skip to main content
15,504,146 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# to Mysql Login code Error Pin
N Mohamed rafi22-Mar-22 2:46
N Mohamed rafi22-Mar-22 2:46 
GeneralRe: C# to Mysql Login code Error Pin
Dave Kreskowiak22-Mar-22 2:49
mveDave Kreskowiak22-Mar-22 2:49 
QuestionC# - managing JSON serialisation Pin
DerekT-P21-Mar-22 1:32
professionalDerekT-P21-Mar-22 1:32 
AnswerRe: C# - managing JSON serialisation Pin
Richard Deeming21-Mar-22 3:10
mveRichard Deeming21-Mar-22 3:10 
GeneralRe: C# - managing JSON serialisation Pin
DerekT-P21-Mar-22 4:21
professionalDerekT-P21-Mar-22 4:21 
GeneralRe: C# - managing JSON serialisation Pin
Richard Deeming21-Mar-22 4:28
mveRichard Deeming21-Mar-22 4:28 
AnswerRe: C# - managing JSON serialisation Pin
Gerry Schmitz21-Mar-22 5:59
mveGerry Schmitz21-Mar-22 5:59 
GeneralRe: C# - managing JSON serialisation Pin
DerekT-P21-Mar-22 8:26
professionalDerekT-P21-Mar-22 8:26 
Thanks Gerry.
Gerry Schmitz wrote:
stop retrieving at the appropriate level
And therein lies the problem - how do you determine the levels to retrieve, when the object is being serialised by .Net in the webservice response processing?

In fact the way I've written it, the lower levels are only retrieved if the collection is null rather than empty. This means I could populate the object, then set the "unwanted" collections / properties to an empty object / array, before letting .Net serialise it. However that does work for non-nullable properties, which will still get serialised (with their default values) when actually I just don't want them at all. I also realised that there are some items which are confidential (e.g. user email address) and while I don't normally want that serialised, there are occasions (when invoked from an admin page and with security in the webservice itself) when I do.

I'm just a bit surprised that JSON serialisation (and by implication XML too) doesn't have a bit more dynamic control / management. That said, it's very very much simpler these days than when I first started writing AJAX applications in 2003 (before the term AJAX had been coined; I was just using raw xmlHttpRequest objects and classic ASP pages at the server...)
AnswerRe: C# - managing JSON serialisation Pin
Eddy Vluggen21-Mar-22 8:02
professionalEddy Vluggen21-Mar-22 8:02 
GeneralRe: C# - managing JSON serialisation Pin
DerekT-P21-Mar-22 8:34
professionalDerekT-P21-Mar-22 8:34 
QuestionRe: C# - managing JSON serialisation Pin
Eddy Vluggen21-Mar-22 13:26
professionalEddy Vluggen21-Mar-22 13:26 
QuestionNeed C# and Mysql Tutorial Pin
N Mohamed rafi20-Mar-22 19:13
N Mohamed rafi20-Mar-22 19:13 
AnswerRe: Need C# and Mysql Tutorial Pin
OriginalGriff20-Mar-22 21:43
mveOriginalGriff20-Mar-22 21:43 
AnswerRe: Need C# and Mysql Tutorial Pin
RobertSF21-Mar-22 11:29
professionalRobertSF21-Mar-22 11:29 
GeneralMysql Update Query Error Pin
N Mohamed rafi20-Mar-22 6:25
N Mohamed rafi20-Mar-22 6:25 
GeneralRe: Mysql Update Query Error Pin
Victor Nijegorodov20-Mar-22 8:47
Victor Nijegorodov20-Mar-22 8:47 
GeneralRe: Mysql Update Query Error Pin
N Mohamed rafi20-Mar-22 9:44
N Mohamed rafi20-Mar-22 9:44 
SuggestionRe: Mysql Update Query Error Pin
Eddy Vluggen20-Mar-22 9:40
professionalEddy Vluggen20-Mar-22 9:40 
GeneralRe: Mysql Update Query Error Pin
N Mohamed rafi20-Mar-22 9:45
N Mohamed rafi20-Mar-22 9:45 
GeneralRe: Mysql Update Query Error Pin
OriginalGriff20-Mar-22 9:47
mveOriginalGriff20-Mar-22 9:47 
GeneralRe: Mysql Update Query Error Pin
Eddy Vluggen20-Mar-22 10:43
professionalEddy Vluggen20-Mar-22 10:43 
GeneralRe: Mysql Update Query Error Pin
OriginalGriff20-Mar-22 10:46
mveOriginalGriff20-Mar-22 10:46 
GeneralRe: Mysql Update Query Error Pin
Eddy Vluggen21-Mar-22 8:06
professionalEddy Vluggen21-Mar-22 8:06 
GeneralRe: Mysql Update Query Error Pin
OriginalGriff21-Mar-22 8:34
mveOriginalGriff21-Mar-22 8:34 
GeneralRe: Mysql Update Query Error Pin
Dave Kreskowiak20-Mar-22 11:49
mveDave Kreskowiak20-Mar-22 11: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.