Open
Description
This issue is derived from my review in #239. I saw that the check data schema algorithm does not perform any check if that DataSchema is equal to string
. In principle, I can understand why: any value in JS can be represented in a string. However, I wonder if a more strict check may make life easier for application developers.
Following, the algorithm a property with string
data schema can even return something like the following:
{
"name":"Jhon",
// .... other properties
}
Consequently, WoT developers should inspect beforehand if that property was mistakenly represented as a string while is actually an object. If we strictly check the type in the check data schema algorithm we mitigate this type of errors, while also maintaining the ability to return an object serialized as a string:
"{ 'name':'Jhon', // .... other properties }"