1. Home
  2. Docs
  3. SiteLint
  4. SEO Rules
  5. malformed-json-ld


Print this article


The rule checks structured data LD+JSON for issues that prevent from parsing schema. Especially it relates to the error:

[Facebook Pixel] – Unable to parse JSON-LD tag. Malformed JSON found:


It is important to have well-defined structured data LD+JSON. But when the structure is malformed then it impacts the processing by search engines as they will have difficulties understanding the structure. The rule checks for whitespaces and ensures it gets parsed without issues.

How to fix it

  1. Make sure your structured data LD+JSON is being represented as a single string, without whitespaces, especially new lines.
  2. If you’re using WordPress plugin Markup (JSON-LD) structured in then enable (check the checkbox) option Compress output data under section Config.
  3. For PHP language use: json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).
Was this article helpful to you? Yes No
SiteLint Audits: Monitoring in real-time Accessibility, Performance, Privacy, Security, SEO, Runtime Errors and Console Logs