Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
TDataSet LoadRows |
Tue, Jul 4 2017 12:09 PM | Permanent Link |
Big Al | I have what I believe is a valid JSON dataset.
The contents are: {"rows":[{"row":{"PersonID":"1"}}]} I am wanting to load this into an ewb dataset. I have create DataSet1. If has a DataSetName of "rows" (I think this is correct) a Name of DataSet1 and 1 column named PersonID which is a dtInteger field I then do the following in ewb: DataSet1.Open; DataSet1.LOadRows(Request.ResponseContent.Text); Request.ResponseContent.text is set to the contents above. When I execute the LoadRows, I get the following error: Expected "}", instead found "PersonID" at 17 Line: 1 Does that mean that my JSON data is in a wrong format? I am using PHP to return the data and it looks like it's correct JSON data format. Not sure what I'm doing wrong. Thanks Big Al |
Tue, Jul 4 2017 12:14 PM | Permanent Link |
Matthew Jones | Big Al wrote:
> {"rows":[{"row":{"PersonID":"1"}}]} https://jsonlint.com/ says it is valid format, so something more to it. Plenty of examples of the format have been posted to the forums, so have a search. Others have asked about this before, so the answer is here! -- Matthew Jones |
Tue, Jul 4 2017 12:23 PM | Permanent Link |
Walter Matte Tactical Business Corporation | What is data definition of PersonID - string or integer?
|
Tue, Jul 4 2017 12:24 PM | Permanent Link |
Walter Matte Tactical Business Corporation | OK I see your original post is Integer - so no double quotes on the 1.
|
Tue, Jul 4 2017 12:36 PM | Permanent Link |
Raul Team Elevate | On 7/4/2017 12:09 PM, Big Al wrote:
> I have what I believe is a valid JSON dataset. > > The contents are: > {"rows":[{"row":{"PersonID":"1"}}]} It's valid JSON but it's not valid EWB Dataset JSON. EWB JSON spec is defined here : https://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=JSON_Reference and says JSON is as follows : { rows: [ <Row>, <Row>, <Row>, ... ] } so in your case it should be {"rows":[{"PersonID":"1"}]} Raul |
Tue, Jul 4 2017 1:25 PM | Permanent Link |
Big Al | Thanks,
Since both ewb and what I was doing are valid JSON format, I just need to coax php into creating the format the way that EWB wants it. Thanks everyone for your help. I will take it from here and see what I can do. Big Al |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |