- Issue created by @gr4phic3r
When using the Schema.org Metatag module to generate JSON-LD, numeric fields (such as width and height) and Boolean values (e.g., representativeOfPage) are rendered with quotes. For example, "3596" instead of 3596, and "TRUE" instead of true.
Although Google generally still parses these values correctly, having them as strings does not align with JSON-LD best practices and can potentially cause issues with other parsers or structured data validators.
Install and enable Schema.org Metatag.
Configure a Product (or any other entity) with numeric/Boolean fields (e.g., width, height, representativeOfPage).
Inspect the generated JSON-LD.
Expected behavior
Numeric fields and Boolean values should be rendered as proper JSON numbers and booleans (e.g., 3596 without quotes, and true instead of "TRUE").
Actual behavior
Numeric fields and Boolean values are wrapped in quotes, making them strings.
Output numeric and Boolean fields as their respective JSON data types rather than strings.
Thank you for considering this request. It would help ensure that the generated structured data follows JSON-LD best practices and possibly avoid parsing issues in some scenarios.
Active
3.0
Code