Skip to content

Commit

Permalink
Fix the error message in jsonization for strings (#34)
Browse files Browse the repository at this point in the history
We erroneously copy-pasted the error message from the function for
de-serialization of booleans to the function for de-serialization of
strings, misleading the user.

This patch fixes the issue.

The problem unfortunately went unnoticed during the review.
  • Loading branch information
mristin authored Jul 20, 2024
1 parent 8254ed9 commit f2d2a90
Show file tree
Hide file tree
Showing 79 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion jsonization/jsonization.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func stringFromJsonable(
return
} else {
err = newDeserializationError(
fmt.Sprintf("Expected a boolean, but got %T", jsonable),
fmt.Sprintf("Expected a string, but got %T", jsonable),
)
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].administration.revision: Expected a boolean, but got []interface {}
assetAdministrationShells[0].administration.revision: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].administration.templateId: Expected a boolean, but got []interface {}
assetAdministrationShells[0].administration.templateId: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].administration.version: Expected a boolean, but got []interface {}
assetAdministrationShells[0].administration.version: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].category: Expected a boolean, but got []interface {}
assetAdministrationShells[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].id: Expected a boolean, but got []interface {}
assetAdministrationShells[0].id: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].idShort: Expected a boolean, but got []interface {}
assetAdministrationShells[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].assetInformation.assetType: Expected a boolean, but got []interface {}
assetAdministrationShells[0].assetInformation.assetType: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].assetInformation.globalAssetId: Expected a boolean, but got []interface {}
assetAdministrationShells[0].assetInformation.globalAssetId: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].lastUpdate: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].lastUpdate: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].maxInterval: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].maxInterval: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].messageTopic: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].messageTopic: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].minInterval: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].minInterval: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].contentType: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].contentType: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
conceptDescriptions[0].category: Expected a boolean, but got []interface {}
conceptDescriptions[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
conceptDescriptions[0].id: Expected a boolean, but got []interface {}
conceptDescriptions[0].id: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
conceptDescriptions[0].idShort: Expected a boolean, but got []interface {}
conceptDescriptions[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.sourceOfDefinition: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.sourceOfDefinition: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.symbol: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.symbol: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.unit: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.unit: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.value: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueFormat: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueFormat: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].extensions[0].name: Expected a boolean, but got []interface {}
assetAdministrationShells[0].extensions[0].name: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].extensions[0].value: Expected a boolean, but got []interface {}
assetAdministrationShells[0].extensions[0].value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].contentType: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].contentType: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].value: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].derivedFrom.keys[0].value: Expected a boolean, but got []interface {}
assetAdministrationShells[0].derivedFrom.keys[0].value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.definition[0].language: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.definition[0].language: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.definition[0].text: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.definition[0].text: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].displayName[0].language: Expected a boolean, but got []interface {}
assetAdministrationShells[0].displayName[0].language: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].displayName[0].text: Expected a boolean, but got []interface {}
assetAdministrationShells[0].displayName[0].text: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName[0].language: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName[0].language: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName[0].text: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName[0].text: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.shortName[0].language: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.shortName[0].language: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.shortName[0].text: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.shortName[0].text: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].description[0].language: Expected a boolean, but got []interface {}
assetAdministrationShells[0].description[0].language: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].description[0].text: Expected a boolean, but got []interface {}
assetAdministrationShells[0].description[0].text: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].value: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].qualifiers[0].type: Expected a boolean, but got []interface {}
submodels[0].qualifiers[0].type: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].qualifiers[0].value: Expected a boolean, but got []interface {}
submodels[0].qualifiers[0].value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].max: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].max: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].assetInformation.defaultThumbnail.contentType: Expected a boolean, but got []interface {}
assetAdministrationShells[0].assetInformation.defaultThumbnail.contentType: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].assetInformation.defaultThumbnail.path: Expected a boolean, but got []interface {}
assetAdministrationShells[0].assetInformation.defaultThumbnail.path: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].assetInformation.specificAssetIds[0].name: Expected a boolean, but got []interface {}
assetAdministrationShells[0].assetInformation.specificAssetIds[0].name: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].assetInformation.specificAssetIds[0].value: Expected a boolean, but got []interface {}
assetAdministrationShells[0].assetInformation.specificAssetIds[0].value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].category: Expected a boolean, but got []interface {}
submodels[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].id: Expected a boolean, but got []interface {}
submodels[0].id: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].idShort: Expected a boolean, but got []interface {}
submodels[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].category: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].category: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
submodels[0].submodelElements[0].idShort: Expected a boolean, but got []interface {}
submodels[0].submodelElements[0].idShort: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueList.valueReferencePairs[0].value: Expected a boolean, but got []interface {}
assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueList.valueReferencePairs[0].value: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
timeStamp: Expected a boolean, but got []interface {}
timeStamp: Expected a string, but got []interface {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
topic: Expected a boolean, but got []interface {}
topic: Expected a string, but got []interface {}

0 comments on commit f2d2a90

Please sign in to comment.