Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [JsonObject(Title = "AuthenticateResponse")]
- public class AuthenticateResponse
- {
- /// <summary>
- /// Gets or sets the status message to return to the patron.
- /// </summary>
- public string StatusMessage { get; set; }
- /// <summary>
- /// Gets or sets the Ils Message.
- /// </summary>
- public string IlsMessage { get; set; }
- /// <summary>
- /// Gets or sets the Ils code that was returned by the authentication attempt
- /// </summary>
- public string IlsCode { get; set; }
- }
- AuthenticateResponse ar = new AuthenticateResponse();
- ar.StatusMessage = "Test status Message";
- ar.IlsMessage = "Test IlsMessage";
- ar.IlsCode = "Code 614";
- string json = JsonConvert.SerializeObject(ar);
- {
- "StatusMessage": "Test status Message",
- "IlsMessage": "Test IlsMessage",
- "IlsCode": "Code 614"
- }
- {
- "AuthenticateResponse": {
- "StatusMessage": "Test status Message",
- "IlsMessage": "Test IlsMessage",
- "IlsCode": "Code 614"
- }
- }
- public class JsonObjectContainer
- {
- public JsonObjectContainer()
- {
- AuthenticateResponse=new AuthenticateResponse();
- }
- public AuthenticateResponse AuthenticateResponse { get; set; }
- }
- JsonObjectContainer ar = new JsonObjectContainer();
- ar.AuthenticateResponse.StatusMessage = "Test status Message";
- ar.AuthenticateResponse.IlsMessage = "Test IlsMessage";
- ar.AuthenticateResponse.IlsCode = "Code 614";
- string json = JsonConvert.SerializeObject(ar);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement