delphi - What is the RootElement of this Content -


i'm trying use trestresponsedatasetadapter.

every combination i've tried json rootelement property fails

you can view content running in browser:

https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo&count=1000

{    "contacts":[       {          "addedat":1405347851360,          "vid":154835,          "canonical-vid":154835,          "merged-vids":[           ],          "portal-id":62515,          "is-contact":true,          "profile-token":"ao_t-mmn77arlmsbctdpop0rf0qyyooz7bhb6ehvufx9unov0pyuiq1wq-a83bqmzfvfvc45t8s6txhkq_7fcdi5wzne7vxydwtvrkiviisznbjwhujj8oixhxw0owesle2qch2_rzsy",          "profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_ao_t-mmn77arlmsbctdpop0rf0qyyooz7bhb6ehvufx9unov0pyuiq1wq-a83bqmzfvfvc45t8s6txhkq_7fcdi5wzne7vxydwtvrkiviisznbjwhujj8oixhxw0owesle2qch2_rzsy/",          "properties":{             "firstname":{                "value":"hubspot"             },             "lastmodifieddate":{                "value":"1429569233340"             },             "lastname":{                "value":"test"             }          },          "form-submissions":[             {                "conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9",                "timestamp":1405347851180,                "form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b",                "portal-id":62515,                "page-url":"http://demo.hubapi.com/your-stunning-headline-30",                "page-title":"your stunning headline!",                "page-id":"324527",                "title":"my new form",                "meta-data":[                 ]             }          ],          "identity-profiles":[             {                "vid":154835,                "saved-at-timestamp":1405347851237,                "deleted-changed-timestamp":0,                "identities":[                   {                      "type":"email",                      "value":"test@hubspot.com",                      "timestamp":1405347851180                   },                   {                      "type":"lead_guid",                      "value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc",                      "timestamp":1405347851237                   }                ]             }          ],          "merge-audits":[           ]       },       {          "addedat":1390569372731,          "vid":196181,          "canonical-vid":196181,          "merged-vids":[           ],          "portal-id":62515,          "is-contact":true,          "profile-token":"ao_t-mnwkzqbrv0uiqppng-wpbgvlfywfgdtyjw3su9frla4esrymotmpo4oqmh736hgvjpudlaujexfxkyripu7ek-hxfywgoqefbbp1cqeh6b0mrpe-iu1dhyrhrjswyroatofvfuo",          "profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_ao_t-mnwkzqbrv0uiqppng-wpbgvlfywfgdtyjw3su9frla4esrymotmpo4oqmh736hgvjpudlaujexfxkyripu7ek-hxfywgoqefbbp1cqeh6b0mrpe-iu1dhyrhrjswyroatofvfuo/",          "properties":{             "firstname":{                "value":"charles"             },             "lastmodifieddate":{                "value":"1429569231725"             },             "company":{                "value":""             },             "lastname":{                "value":"gowland"             }          },          "form-submissions":[           ],          "identity-profiles":[             {                "vid":196181,                "saved-at-timestamp":1390569372649,                "deleted-changed-timestamp":0,                "identities":[                   {                      "type":"email",                      "value":"clg@gburnette.com",                      "timestamp":1390568711002                   },                   {                      "type":"lead_guid",                      "value":"dca0d8a2-fa9c-4ca6-b5ef-c1bfb4a0bed4",                      "timestamp":1390569372636                   }                ]             }          ],          "merge-audits":[           ]       },       {          "addedat":1390569372834,          "vid":196182,          "canonical-vid":196182,          "merged-vids":[           ],          "portal-id":62515,          "is-contact":true,          "profile-token":"ao_t-mptj_eis2780cjondgkv5bmchukjnq37qmmsc-lpjaceyzxo8piybhaahqzt0hbxxq0qyxfu_4wn5ewyscltt8we3kaxx6neusnnygr8aeiy-s6izag-ccehtdomm5pai4yokue",          "profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_ao_t-mptj_eis2780cjondgkv5bmchukjnq37qmmsc-lpjaceyzxo8piybhaahqzt0hbxxq0qyxfu_4wn5ewyscltt8we3kaxx6neusnnygr8aeiy-s6izag-ccehtdomm5pai4yokue/",          "properties":{             "firstname":{                "value":"curtis"             },             "lastmodifieddate":{                "value":"1429569238098"             },             "company":{                "value":""             },             "lastname":{                "value":"romig"             }          },          "form-submissions":[           ],          "identity-profiles":[             {                "vid":196182,                "saved-at-timestamp":1390569372699,                "deleted-changed-timestamp":0,                "identities":[                   {                      "type":"email",                      "value":"curtis.romig@bryancave.com",                      "timestamp":1390568725415                   },                   {                      "type":"lead_guid",                      "value":"e18dc184-0238-48f1-a8a2-4476733f50d3",                      "timestamp":1390569372641                   }                ]             }          ],          "merge-audits":[           ]       },       {          "addedat":1390569372757,          "vid":196183,          "canonical-vid":196183,          "merged-vids":[           ],          "portal-id":62515,          "is-contact":true,          "profile-token":"ao_t-moq49asr9pf4p9paqxhvapljs9cxdfqcfs4bl7y5z7tryrosc9i8cxxgodxzqc-3d1doxt5g-pmag283afo0byy3d-1av2vhwilvz3t1kf-6g7dbqw80lrqbjpbjhtlny7u6rd-",          "profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_ao_t-moq49asr9pf4p9paqxhvapljs9cxdfqcfs4bl7y5z7tryrosc9i8cxxgodxzqc-3d1doxt5g-pmag283afo0byy3d-1av2vhwilvz3t1kf-6g7dbqw80lrqbjpbjhtlny7u6rd-/",          "properties":{             "firstname":{                "value":"eugene"             },             "lastmodifieddate":{                "value":"1429569256338"             },             "company":{                "value":""             },             "lastname":{                "value":"klibanoff"             }          },          "form-submissions":[           ],          "identity-profiles":[             {                "vid":196183,                "saved-at-timestamp":1390569372682,                "deleted-changed-timestamp":0,                "identities":[                   {                      "type":"email",                      "value":"eklibanoff@incomm.com",                      "timestamp":1390568722786                   },                   {                      "type":"lead_guid",                      "value":"276f1a0f-ce8f-4069-9b7a-405f9e14971a",                      "timestamp":1390569372674                   }                ]             }          ],          "merge-audits":[           ]       },       {          "addedat":1390569372800,          "vid":196184,          "canonical-vid":196184,          "merged-vids":[           ],          "portal-id":62515,          "is-contact":true,          "profile-token":"ao_t-mmay6vd3gbnxxoggn7wya4332kjwey6hyvggd98z-myehhaxl8bqahsmsgq1vvun9_jouplqq5zc4e0-fnjoqj-ynp23nsqldkbyy0wf-m5pgnogewxev2elnvjmfffq0u3sxxl",          "profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_ao_t-mmay6vd3gbnxxoggn7wya4332kjwey6hyvggd98z-myehhaxl8bqahsmsgq1vvun9_jouplqq5zc4e0-fnjoqj-ynp23nsqldkbyy0wf-m5pgnogewxev2elnvjmfffq0u3sxxl/",          "properties":{             "firstname":{                "value":"james c. & brenda l."             },             "lastmodifieddate":{                "value":"1429569255451"             },             "company":{                "value":""             },             "lastname":{                "value":"kellling"             }          },          "form-submissions":[           ],          "identity-profiles":[             {                "vid":196184,                "saved-at-timestamp":1390569372744,                "deleted-changed-timestamp":0,                "identities":[                   {                      "type":"email",                      "value":"jameskelling@bellsouth.net",                      "timestamp":1390568911277                   },                   {                      "type":"lead_guid",                      "value":"4b92ccc6-d777-4e3e-90d9-bc4722329c16",                      "timestamp":1390569372738                   }                ]             }          ],          "merge-audits":[           ]       }    ],    "has-more":true,    "vid-offset":196184 } 

i'm trying build clientdataset includes company, firstname, lastname , email

can please view content , identify correct rootelement me ?

there no plug-and-play way kind of data structure map inside tclientdataset.

the mapping can done trestresponsedatasetadapter on array of objects this

[   {     "firstname": "john",     "lastname": "doe",     "email": "john@doe.com"   },   {     "firstname": "jane",     "lastname": "doe",     "email": "jane@doe.com"   } ] 

or nested

{   "contacts": [     {       "firstname": "john",       "lastname": "doe",       "email": "john@doe.com"     },     {       "firstname": "jane",       "lastname": "doe",       "email": "jane@doe.com"     }   ] } 

when set rootelement property contacts.

but not kind of nested structure getting rest api.

you have know structure , map by hand


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -