You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

JSON-LD验证提示缺失'}'或对象成员名,求故障排查

问题排查与修复方案

核心语法错误:未转义的字符串换行

你的JSON-LD代码里,description字段的字符串包含未转义的换行符,这违反了JSON语法规则——JSON字符串不允许直接换行,必须用\n转义或合并为单行。解析器遇到未转义换行时,会误判字符串未闭合,进而抛出“Missing '}' or object member name”错误。

额外Schema规范问题

除了语法错误,还有一处不符合schema.org的类型要求:

  • offers.price字段:Offer类型要求price是纯数字(如4999000),而非带货币符号的字符串("$4999000"),货币符号已通过priceCurrency(USD)指定,无需重复写在价格里。

修复后的完整代码

{
  "@context": "https://schema.org",
  "@type": "RealEstateListing",
  "name": "8 Bedroom Residential",
  "description": "Romantic and impressive Mediterranean estate situated on a one acre, street to street view lot in the hills of coveted North Tustin, Villa Fiorile is a custom gated estate in an unmatched setting with mature trees and lush gardens. Grand, intimate, and rich in character and style, this residence is accented by saturated colors, arched windows and doors, interior arched casings, and exposed wood-beamed ceilings. Upon entering the residence, one is welcomed by a dramatic entry hall that leads into the majestic living room anchored by a fireplace with European mahogany windows offering expansive views from Catalina to Palos Verdes and beyond. French doors in the adjacent sun room lead out to serene grounds with a sparkling all-tile swimming pool. The spacious property offers a main house with five bedrooms, three of which are large enough to be primary suites, each adorned with luxurious spa-like Carrara marble baths. The two additional bedrooms have their own baths. Rich mahogany patio doors and windows surround the home and encourage indoor and outdoor living. Materials used throughout are rarely seen in today’s homes. From the expansive formal living and dining rooms, cozy family room with fireplace and sitting room, and charming kitchen, the authentic Mediterranean finishes showcase the home’s timeless style. The grounds feature an expansive lawn, patios with old world fountains, garden, majestic oak and palm trees, a two-story guest house and separate casita. Homes of this",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "1621 FOOTHILL BLVD",
    "addressLocality": "SANTA ANA",
    "addressRegion": "CA",
    "postalCode": "92705",
    "addressCountry": "US"
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 33.760629,
    "longitude": -117.785239
  },
  "image": "https://api1.realtytrac.com/api/v1/properties/photo?u=AZbWrYHm2bcgjXps4ixc7OKvon-poleUd_Rd7GqF0TYPpYtz3JiXjv6_K0Q-Heoc5MAqCPP_s-MxdpH0EIUTFcLOyjCt60liESSDdXwvI7wlsOHWdCkN2XO2BEW8x0mfG5SskhXp9OiFDyghsxT5XM3S-n8o",
  "offers": {
    "@type": "Offer",
    "priceCurrency": "USD",
    "price": 4999000,
    "URL": "https://www.realtytrac.com/p/foothill-blvd-santa-ana-ca-92705-52061555/",
    "availability": "http://schema.org/InStock"
  },
  "url": "https://www.realtytrac.com/p/foothill-blvd-santa-ana-ca-92705-52061555/"
}

修复说明

  1. 把description的多行内容合并为单行(或把换行替换为\n转义符),确保JSON字符串符合语法规范。
  2. 将offers.price改为纯数字4999000,匹配schema.org的类型要求。

内容的提问来源于stack exchange,提问作者linfiesto

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 20:15:16