Deserialize a complex JSON response in Dynamics Nav 2016

Abdel1978
Member Posts: 10
Hi every one,
Please I need your help.
When I send REST request from Dynamics Nav 2016 I receive a JSON as response.
My question is how te deserialize this JSON in order to keep only "ClientList" because I need this list to update Customer data in Navision.
Thank you for help
JSNO request is like (See attached file):
{
"ClientList": [{
"CliId": 121093,
"CliDMSId": "631035",
"CliTitle": "",
"CliFamName": "EPIE LAURENT",
"CliFirName": "",
"CliAddr1": "19 all\u00E9e du CLOSE gagneur",
"CliAddr2": "",
"CliPC": "93160",
"CliCity": "NOISY LE GRAND",
"CliHomePhone": "01 81 80 30 00",
"CliCellPhone": "",
"CliWorkPhone": "01 81 80 30 00",
"CliFax": "",
"CliEmail": "julien@3dsoft.fr",
"CliAccountType": "",
"CliState": "",
"CliCountry": "",
"CliTags": "",
"CliDoNotText": 0,
"CliDoNotEmail": 0,
"CliDoNotPhone": 0,
"CliCashPayment": 0,
"CliLocked": 0,
"CliLanguage": "",
"ProviderCliId": "39049",
"CliActive": 1,
"CliVehicleList": [],
"ContactList": []
}, {
"CliId": 112174,
"CliDMSId": "853027",
"CliTitle": "",
"CliFamName": "FEILLANT CHRISTELLE",
"CliFirName": "",
"CliAddr1": "19 all\u00E9e du CLOSE gagneur",
"CliAddr2": "",
"CliPC": "93160",
"CliCity": "NOISY LE GRAND",
"CliHomePhone": "01 81 80 30 00",
"CliCellPhone": "07 71 44 61 59",
"CliWorkPhone": "01 81 80 30 00",
"CliFax": "",
"CliEmail": "",
"CliAccountType": "",
"CliState": "",
"CliCountry": "",
"CliTags": "",
"CliDoNotText": 0,
"CliDoNotEmail": 0,
"CliDoNotPhone": 0,
"CliCashPayment": 0,
"CliLocked": 0,
"CliLanguage": "",
"ProviderCliId": "39048",
"CliActive": 1,
"CliVehicleList": [],
"ContactList": []
}],
"VehicleList": [{
"VehId": 197253,
"CliId": 122021,
"CliDMSId": "616916",
"VehVIN": "WVWZZZ1KZ7B077540",
"VehRegNum": "AK274PN",
"VehMake": "VOLKSWAGEN",
"VehModel": "GOLF",
"VehType": "",
"VehKm": "",
"VehPower": "",
"VehTaxPower": "",
"VehSeats": "",
"VehRegDate": "2010-03-23",
"VehYear": "2010",
"VehColor": "",
"VehPaint": "",
"VehUsedCarNum": "",
"VehEngineNum": "",
"VehFuelLevel": "",
"VehState": "",
"VehActive": 1,
"VehModelCode": "",
"VehStockNum": "",
"VehAdvisor": "",
"VehTags": "",
"ProviderCliId": "",
"ProviderVehId": "",
"LoanerAvailabilityList": []
}],
"RendezVousList": [{
"RdvId": 1892,
"RdvType": 2,
"WorkLineList": [{
"WorkLineNumber": 1030,
"WorkLaborCode": "",
"WorkDescription": "Vitrage",
"WorkComment": "",
"WorkWarranty": 0,
"WorkTechCode": "",
Please I need your help.
When I send REST request from Dynamics Nav 2016 I receive a JSON as response.
My question is how te deserialize this JSON in order to keep only "ClientList" because I need this list to update Customer data in Navision.
Thank you for help
JSNO request is like (See attached file):
{
"ClientList": [{
"CliId": 121093,
"CliDMSId": "631035",
"CliTitle": "",
"CliFamName": "EPIE LAURENT",
"CliFirName": "",
"CliAddr1": "19 all\u00E9e du CLOSE gagneur",
"CliAddr2": "",
"CliPC": "93160",
"CliCity": "NOISY LE GRAND",
"CliHomePhone": "01 81 80 30 00",
"CliCellPhone": "",
"CliWorkPhone": "01 81 80 30 00",
"CliFax": "",
"CliEmail": "julien@3dsoft.fr",
"CliAccountType": "",
"CliState": "",
"CliCountry": "",
"CliTags": "",
"CliDoNotText": 0,
"CliDoNotEmail": 0,
"CliDoNotPhone": 0,
"CliCashPayment": 0,
"CliLocked": 0,
"CliLanguage": "",
"ProviderCliId": "39049",
"CliActive": 1,
"CliVehicleList": [],
"ContactList": []
}, {
"CliId": 112174,
"CliDMSId": "853027",
"CliTitle": "",
"CliFamName": "FEILLANT CHRISTELLE",
"CliFirName": "",
"CliAddr1": "19 all\u00E9e du CLOSE gagneur",
"CliAddr2": "",
"CliPC": "93160",
"CliCity": "NOISY LE GRAND",
"CliHomePhone": "01 81 80 30 00",
"CliCellPhone": "07 71 44 61 59",
"CliWorkPhone": "01 81 80 30 00",
"CliFax": "",
"CliEmail": "",
"CliAccountType": "",
"CliState": "",
"CliCountry": "",
"CliTags": "",
"CliDoNotText": 0,
"CliDoNotEmail": 0,
"CliDoNotPhone": 0,
"CliCashPayment": 0,
"CliLocked": 0,
"CliLanguage": "",
"ProviderCliId": "39048",
"CliActive": 1,
"CliVehicleList": [],
"ContactList": []
}],
"VehicleList": [{
"VehId": 197253,
"CliId": 122021,
"CliDMSId": "616916",
"VehVIN": "WVWZZZ1KZ7B077540",
"VehRegNum": "AK274PN",
"VehMake": "VOLKSWAGEN",
"VehModel": "GOLF",
"VehType": "",
"VehKm": "",
"VehPower": "",
"VehTaxPower": "",
"VehSeats": "",
"VehRegDate": "2010-03-23",
"VehYear": "2010",
"VehColor": "",
"VehPaint": "",
"VehUsedCarNum": "",
"VehEngineNum": "",
"VehFuelLevel": "",
"VehState": "",
"VehActive": 1,
"VehModelCode": "",
"VehStockNum": "",
"VehAdvisor": "",
"VehTags": "",
"ProviderCliId": "",
"ProviderVehId": "",
"LoanerAvailabilityList": []
}],
"RendezVousList": [{
"RdvId": 1892,
"RdvType": 2,
"WorkLineList": [{
"WorkLineNumber": 1030,
"WorkLaborCode": "",
"WorkDescription": "Vitrage",
"WorkComment": "",
"WorkWarranty": 0,
"WorkTechCode": "",
0
Answers
-
I have multiple time had great succes with downgrade the Json buffer table from NAV 2018 to both NAV 2015 and NAV 2016.
Then you can use the Microsoft default object to import the json file.
For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions