![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Mon, Nov 4 2019 10:18 PM | Permanent Link |
Paul Coshott | Hi All,
We have a REST service for logging a user in and this is working with no problems. But if the login is rejected, I'm not sure how to read the json format that the error is in. It looks like this: { "error": {"code":"Exception","message":"Invalid user name or password."} } I just want the message part. Can anyone tell me how to use a TReader to get that? Thanks, Paul |
Tue, Nov 5 2019 4:39 AM | Permanent Link |
Walter Matte Tactical Business Corporation | There is a JSON parsing unit in the Component forum. That can be used as an alternative to the TReader,
https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_components&page=1&msg=152#152 Walter Paul Coshott wrote: Hi All, We have a REST service for logging a user in and this is working with no problems. But if the login is rejected, I'm not sure how to read the json format that the error is in. It looks like this: { "error": {"code":"Exception","message":"Invalid user name or password."} } I just want the message part. Can anyone tell me how to use a TReader to get that? Thanks, Paul Attachments: JsonParse.png |
Tue, Nov 5 2019 8:52 AM | Permanent Link |
Paul Coshott | Thanks Walter. I'll check it out.
Cheers, Paul Walter Matte wrote: There is a JSON parsing unit in the Component forum. That can be used as an alternative to the TReader, https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_components&page=1&msg=152#152 |
Wed, Nov 6 2019 4:09 AM | Permanent Link |
Matthew Jones | Paul Coshott wrote:
> { "error": > {"code":"Exception","message":"Invalid user name or password."} > } Define a class with a published error property which is an object with the two string properties of "code" and "message". I think it will then be automatic. -- Matthew Jones |
Wed, Nov 6 2019 5:07 AM | Permanent Link |
Walter Matte Tactical Business Corporation | Also see the example that comes with EWB - Persistence.
Searching forum you will see Matthew's JSONList.zip where he users TReader and TWriter. Walter |
This web page was last updated on Sunday, April 27, 2025 at 01:25 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |