Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. [JsonObject(Title = "AuthenticateResponse")]
  2. public class AuthenticateResponse
  3. {
  4. /// <summary>
  5. /// Gets or sets the status message to return to the patron.
  6. /// </summary>
  7. public string StatusMessage { get; set; }
  8.  
  9. /// <summary>
  10. /// Gets or sets the Ils Message.
  11. /// </summary>
  12. public string IlsMessage { get; set; }
  13.  
  14. /// <summary>
  15. /// Gets or sets the Ils code that was returned by the authentication attempt
  16. /// </summary>
  17. public string IlsCode { get; set; }
  18. }
  19.  
  20. AuthenticateResponse ar = new AuthenticateResponse();
  21. ar.StatusMessage = "Test status Message";
  22. ar.IlsMessage = "Test IlsMessage";
  23. ar.IlsCode = "Code 614";
  24.  
  25. string json = JsonConvert.SerializeObject(ar);
  26.  
  27. {
  28. "StatusMessage": "Test status Message",
  29. "IlsMessage": "Test IlsMessage",
  30. "IlsCode": "Code 614"
  31. }
  32.  
  33. {
  34. "AuthenticateResponse": {
  35. "StatusMessage": "Test status Message",
  36. "IlsMessage": "Test IlsMessage",
  37. "IlsCode": "Code 614"
  38. }
  39. }
  40.  
  41. public class JsonObjectContainer
  42. {
  43. public JsonObjectContainer()
  44. {
  45. AuthenticateResponse=new AuthenticateResponse();
  46. }
  47. public AuthenticateResponse AuthenticateResponse { get; set; }
  48. }
  49.  
  50. JsonObjectContainer ar = new JsonObjectContainer();
  51. ar.AuthenticateResponse.StatusMessage = "Test status Message";
  52. ar.AuthenticateResponse.IlsMessage = "Test IlsMessage";
  53. ar.AuthenticateResponse.IlsCode = "Code 614";
  54.  
  55. string json = JsonConvert.SerializeObject(ar);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement