KVK API How to deserialise ?

0
Hi, I have a problem deserialising the JSON content from the Dutch KVK Search API. I am able to GET the body info, (See below) but not able to deserialise it in my model. Can someone please give me a push in the right direction ? ( I have tried the KVK Module in the APP Store, that one does not seem to work anymore) Thanks ! Onco   =========== The model: The Flow:    The body info: ===================================== {   "apiVersion": "2.0",   "meta": {},   "data": {     "itemsPerPage": 10,     "startPage": 1,     "totalItems": 13,     "nextLink": "https://api.kvk.nl/api/v2/search/companies?q=mendix&user_key=XXXXXXXXXX&startPage=2",     "items": [       {         "kvkNumber": "24380476",         "branchNumber": "000017452910",         "rsin": "814621570",         "tradeNames": {           "businessName": "Mendix Technology B.V.",           "shortBusinessName": "Mendix Technology B.V.",           "currentTradeNames": [             "Mendix Technology B.V."           ],           "currentStatutoryNames": [             "Mendix Technology B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": false,         "isBranch": true,         "isMainBranch": true,         "addresses": [           {             "type": "vestigingsadres",             "street": "Gedempte Zalmhaven",             "houseNumber": "4",             "houseNumberAddition": "K",             "postalCode": "3011BT",             "city": "Rotterdam",             "country": "Nederland"           }         ],         "websites": [           "www.mendix.com"         ]       },       {         "kvkNumber": "24379726",         "branchNumber": "000018877206",         "rsin": "814621296",         "tradeNames": {           "businessName": "Mendix B.V.",           "shortBusinessName": "Mendix B.V.",           "currentTradeNames": [             "Mendix B.V."           ],           "currentStatutoryNames": [             "Mendix B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": false,         "isBranch": true,         "isMainBranch": true,         "addresses": [           {             "type": "vestigingsadres",             "street": "Gedempte Zalmhaven",             "houseNumber": "4",             "houseNumberAddition": "K",             "postalCode": "3011BT",             "city": "Rotterdam",             "country": "Nederland"           }         ],         "websites": [           "www.mendix.com"         ]       },       {         "kvkNumber": "24380474",         "branchNumber": "000011762845",         "rsin": "814622240",         "tradeNames": {           "businessName": "Mendix Holding B.V.",           "shortBusinessName": "Mendix Holding B.V.",           "currentTradeNames": [             "Mendix Holding B.V."           ],           "currentStatutoryNames": [             "Mendix Holding B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": false,         "isBranch": true,         "isMainBranch": true,         "addresses": [           {             "type": "vestigingsadres",             "street": "Gedempte Zalmhaven",             "houseNumber": "4",             "houseNumberAddition": "K",             "postalCode": "3011BT",             "city": "Rotterdam",             "country": "Nederland"           }         ],         "websites": [           "www.deltalogica.com"         ]       },       {         "kvkNumber": "24449045",         "branchNumber": "000018795676",         "rsin": "820225782",         "tradeNames": {           "businessName": "Mendix International B.V.",           "shortBusinessName": "Mendix International B.V.",           "currentTradeNames": [             "Mendix International B.V."           ],           "currentStatutoryNames": [             "Mendix International B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": false,         "isBranch": true,         "isMainBranch": true,         "addresses": [           {             "type": "vestigingsadres",             "street": "Gedempte Zalmhaven",             "houseNumber": "4",             "houseNumberAddition": "K",             "postalCode": "3011BT",             "city": "Rotterdam",             "country": "Nederland"           }         ]       },       {         "kvkNumber": "24380474",         "rsin": "814622240",         "tradeNames": {           "shortBusinessName": "Mendix Holding B.V.",           "currentStatutoryNames": [             "Mendix Holding B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": true,         "isBranch": false,         "isMainBranch": false       },       {         "kvkNumber": "24380476",         "rsin": "814621570",         "tradeNames": {           "shortBusinessName": "Mendix Technology B.V.",           "currentStatutoryNames": [             "Mendix Technology B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": true,         "isBranch": false,         "isMainBranch": false       },       {         "kvkNumber": "24449045",         "rsin": "820225782",         "tradeNames": {           "shortBusinessName": "Mendix International B.V.",           "currentStatutoryNames": [             "Mendix International B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": true,         "isBranch": false,         "isMainBranch": false       },       {         "kvkNumber": "24379726",         "rsin": "814621296",         "tradeNames": {           "shortBusinessName": "Mendix B.V.",           "currentStatutoryNames": [             "Mendix B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": true,         "isBranch": false,         "isMainBranch": false       },       {         "kvkNumber": "55621600",         "rsin": "851790252",         "tradeNames": {           "shortBusinessName": "Stichting Administratiekantoor ESOP Mendix",           "currentStatutoryNames": [             "Stichting Administratiekantoor ESOP Mendix"           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": true,         "isBranch": false,         "isMainBranch": false,         "addresses": [           {             "type": "bezoekadres",             "street": "Gedempte Zalmhaven",             "houseNumber": "4",             "houseNumberAddition": "K",             "postalCode": "3011BT",             "city": "Rotterdam",             "country": "Nederland"           }         ]       },       {         "kvkNumber": "54125286",         "branchNumber": "000023938145",         "rsin": "851176203",         "tradeNames": {           "businessName": "InShoring Pros Holding B.V.",           "shortBusinessName": "InShoring Pros Holding B.V.",           "currentTradeNames": [             "InShoring Pros Holding B.V.",             "Recourcing Pros",             "Mobile Pros",             "eCommerce Pros",             "MyWebshopManager",             "Mendix Pros",             "Cloud Pros",             "Testing Pros"           ],           "currentStatutoryNames": [             "InShoring Pros Holding B.V."           ]         },         "hasEntryInBusinessRegister": true,         "hasNonMailingIndication": false,         "isLegalPerson": false,         "isBranch": true,         "isMainBranch": true,         "addresses": [           {             "type": "vestigingsadres",             "street": "Bos en Vaartstraat",             "houseNumber": "28",             "houseNumberAddition": "RD",             "postalCode": "2012LH",             "city": "Haarlem",             "country": "Nederland"           }         ],         "websites": [           "www.inshoring-pros.com"         ]       }     ]   } }   =====================================
asked
4 answers
1

Add all attributes of all entities, add the assocation "meta" to a new empty "metas" entity. You need that for

"meta": {},

part of the json message.

answered
1

if I use the automatic map version of the rest support in mendix, i get the following domain model. Hope this is usefull for you.

 

answered
0

Onco

Do you get an error message when you try to deserialize?  If so, can you share it in this posting?

Also, you are using the REST module for this, however, this kind of activity is now supported natively in Mendix.  For a good description of how to do this, you can start here .  Using the native capabilities, you can quickly create an import mapping and the corresponding domain model.

Hope that helps,

Mike

answered
0

Thanks guys !

Unfortunatly the KVK dopws not have a WDSL, so I have to do it myself.

I changed the model to this one and is working almost. I have to get de currentStatutoryNames into the model, which is a PrimitiveArray. I not able to get the values in. I have tried several ways but unfortunatly, no Glory. 
In the documentation the  PrimitiveArray & Deserialising & Model is not explained it seems.

Could you give me a last push ?

Thanks!

Onco

answered