bildwelt
E2E FORUM
E2E Bridge E2E Commerce

Reply To: JSON null valued fields

E2E Forum Modeling & Development JSON null valued fields Reply To: JSON null valued fields

#1820

Cliff Faurer
Participant

Hello Jakub,

What’s the status on this issue? It’s causing a problem in retrieving content from a DB as only some fields are returned and the classToJSON() is preserving the null fields, which were not requested on the REST query.

Example GET with fields=href,nameType,status :

[
{
"id": "000000049995f58400003da40000058cf1c70ece",
"href": "http://localhost:10002/partyManagement/organization/000000049995f58400003da40000058cf1c70ece",
"isLegalEntity": null,
"type": null,
"tradingName": null,
"nameType": "string",
"status": "initialized"
},
{
"id": "0000000b99961a6100003da40000058cf2570c4a",
"href": "http://localhost:10002/partyManagement/organization/0000000b99961a6100003da40000058cf2570c4a",
"isLegalEntity": null,
"type": null,
"tradingName": null,
"nameType": "string",
"status": "initialized"
}
]

Example GET:

[
{
"id": "000000049995f58400003da40000058cf1c70ece",
"href": "http://localhost:10002/partyManagement/organization/000000049995f58400003da40000058cf1c70ece",
"isLegalEntity": true,
"type": "string",
"tradingName": "diglet",
"nameType": "string",
"status": "initialized",
"existsDuring": {
"startDate": "2015-02-17T21:51:41.538Z",
"endDate": "2015-02-17T21:51:41.538Z"
},
"otherName": [
{
"tradingName": "string",
"nameType": "string",
"validFor": {
"startDateTime": "2015-02-17T21:51:41.538Z",
"endDateTime": "2015-02-17T21:51:41.538Z"
}
}
],
"characteristic": [
{
"name": "string",
"value": "string"
}
],
"organizationIdentification": [
{
"identificationId": "string",
"type": "string",
"issuingAuthority": "string",
"issuingDate": "2015-02-17T21:51:41.538Z"
}
],
"externalReference": [
{
"href": "string",
"type": "string"
}
],
"relatedParty": [
{
"href": "string",
"role": "string",
"name": "string",
"validFor": null,
"alias": [
{
"type": "string",
"value": "string"
}
],
"status": "string"
}
],
"organizationParentRelationship": {
"href": "string",
"relationshipType": "string"
},
"organizationChildRelationship": [
{
"href": "string",
"relationshipType": "string"
}
],
"contactMedium": [
{
"type": "string",
"isPreferred": true,
"validFor": null,
"medium": {
"city": "string",
"country": "string",
"emailAddress": "string",
"type": "string",
"number": "string",
"postcode": "string",
"stateOrProvince": "string",
"street1": "string",
"street2": "string"
}
}
]
},
{
"id": "0000000b99961a6100003da40000058cf2570c4a",
"href": "http://localhost:10002/partyManagement/organization/0000000b99961a6100003da40000058cf2570c4a",
"isLegalEntity": true,
"type": "string",
"tradingName": "penny",
"nameType": "string",
"status": "initialized",
"existsDuring": {
"startDate": "2015-02-17T21:51:41.538Z",
"endDate": "2015-02-17T21:51:41.538Z"
},
"otherName": [
{
"tradingName": "string",
"nameType": "string",
"validFor": {
"startDateTime": "2015-02-17T21:51:41.538Z",
"endDateTime": "2015-02-17T21:51:41.538Z"
}
}
],
"characteristic": [
{
"name": "string",
"value": "string"
}
],
"organizationIdentification": [
{
"identificationId": "string",
"type": "string",
"issuingAuthority": "string",
"issuingDate": "2015-02-17T21:51:41.538Z"
}
],
"externalReference": [
{
"href": "string",
"type": "string"
}
],
"relatedParty": [
{
"href": "string",
"role": "string",
"name": "string",
"validFor": null,
"alias": [
{
"type": "string",
"value": "string"
}
],
"status": "string"
}
],
"organizationParentRelationship": {
"href": "string",
"relationshipType": "string"
},
"organizationChildRelationship": [
{
"href": "string",
"relationshipType": "string"
}
],
"contactMedium": [
{
"type": "string",
"isPreferred": true,
"validFor": null,
"medium": {
"city": "string",
"country": "string",
"emailAddress": "string",
"type": "string",
"number": "string",
"postcode": "string",
"stateOrProvince": "string",
"street1": "string",
"street2": "string"
}
}
]
}
]

Thanks,
Cliff