Click here to Skip to main content
15,909,566 members

Comments by Member 11725507 (Top 5 by date)

Member 11725507 9-Oct-17 10:40am View    
No its act as Response from service side.
Member 11725507 9-Oct-17 6:56am View    
Yes I can use it with a default value but I dont want to display the Property with default values also I just want to ignore it. For this we can able to achieve by using separate class but I was thinking to reuse the same class by keeping few property as optional. So now I can conclude that we cant do it right?
Member 11725507 9-Oct-17 6:29am View    
{ "weeks": [ {
"s1": [ 0, 0,0,0,0, 0],
"s2": [0,0,0,0,0,0],
"s3": [0,0,0,0,0,0],
"s4": [0,0,0,0,0,0],
"isForecasted": null,
"isGenerated": null,
"isPosted": null,
"startDate": null,
"endDate": null
}
]}
I have posted the response generated JSON, and Instead of showing NUll in reponse, I don't want "isForecasted","isGenerated","isPosted","startDate","endDate" object. But in another response i will pass value for the above values so it will be needed for the another scenario. I hope it would be helpful for the solution.
Member 11725507 7-Oct-17 7:38am View    
Thanks a lot for the solution
Member 11725507 7-Oct-17 5:03am View    
Thanks for the comments. Yes, Its a invalid JSON. Is it possible to atleast create like below, "Obj1": {
"0": 17,
"1": 23,
"2": 23,
"3": 24,
"4": 25,
"5": 56,
"6": 65
}