You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the "fossilGhgEmissions" is defined as "Decimal" which is further described in JSON representation it MUST be encoded as a JSON String.
In 4.01/Pcf.ttl, fossilGhgEmissions has characteristic of "PositiveEmissionsTrait;" which has the base characteristic "PositiveEmission" which is bamm:dataType xsd:decimal.
But the json-schema translation which is gen/json-schema.json, says it is number in json.
Where
Your "fossilGhgEmissions" as json number is not aligned with the WBCSD's definition as JSON String
I guess, the WBCSD's specification of Decimal is precision wise numeric data type, so it is represented as JSON String for avoiding errors like 0.1+0.2!=0.3
FYI: this is what happened in python, this kind of error is not preferable for precision wise numeric type:
Additional context
Other property which has "Decimal" or variants may have the same issue.
FYI: In the OData v4(which is database community standard), the precision-wise data type is Edm.Decimal which is converted to JSON String or number, depending on the option IEEE754Compatible=true or false.
The text was updated successfully, but these errors were encountered:
Describe the bug
According to WBCSD's specification of PCF data ,
Technical Specifications for PCF Data Exchange (Version 2.0.1-20230927)
the "fossilGhgEmissions" is defined as "Decimal" which is further described in JSON representation it MUST be encoded as a JSON String.
In 4.01/Pcf.ttl, fossilGhgEmissions has characteristic of "PositiveEmissionsTrait;" which has the base characteristic "PositiveEmission" which is bamm:dataType xsd:decimal.
But the json-schema translation which is gen/json-schema.json, says it is number in json.
Where
Your "fossilGhgEmissions" as json number is not aligned with the WBCSD's definition as JSON String
I guess, the WBCSD's specification of Decimal is precision wise numeric data type, so it is represented as JSON String for avoiding errors like 0.1+0.2!=0.3
FYI: this is what happened in python, this kind of error is not preferable for precision wise numeric type:
Additional context
Other property which has "Decimal" or variants may have the same issue.
FYI: In the OData v4(which is database community standard), the precision-wise data type is Edm.Decimal which is converted to JSON String or number, depending on the option IEEE754Compatible=true or false.
The text was updated successfully, but these errors were encountered: