json-ld

Schema.org practices for small company: 'Organization' and 'WebSite' in JSON-LD on every page, Microdata for everything else

删除回忆录丶 提交于 2019-12-24 00:42:53
问题 I'm wondering how to build my Schema.org. I'm using mixed approach with both JSON-LD and Microdata elements. I don't use them to describe one thing in 2 different ways. I need some guidelines about what to include. For now I have description of our company on every page: <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "url" : "https://our.url", "logo" : "https://our.url/logo2.svg", "contactPoint" : [{ "@type" : "ContactPoint", "telephone" : ""

HATEOAS and forms driven by the API

半城伤御伤魂 提交于 2019-12-23 12:26:54
问题 I'm trying to apply HATEOAS to the existing application and I'm having trouble with modeling a form inputs that would be driven by the API response. The app is allowing to search & book connections between two places. First endpoint allows for searching the connections GET /connections?from={lat,lon}&to={lat,lon}&departure={dateTime} and returns following payload (response body). [ { "id": "aaa", "carrier": "Fast Bus", "price": 3.20, "departure": "2019-04-05T12:30" }, { "id": "bbb", "carrier"

Google sitelink search box [closed]

a 夏天 提交于 2019-12-23 06:20:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . We are implementing search box within the search result in Google for our site. We have our own search feature on website, and dont want to use Google custom search. We are following instructions on the following page, but finding it difficult to set it up. Google developer site. I added the following JSON-LD in

What is the proper value representation of a schema.org/polygon when used in JSON-LD?

﹥>﹥吖頭↗ 提交于 2019-12-21 19:46:43
问题 The data representation I will try to use for a RESTful API is JSON-LD and the vocabulary I intend to use are those from schema.org . In the vocabulary schema.org/GeoShape, it says that polygons are expected to be on text format but it doesn't exactly say what kind of text format. It wasn't also stated that it should use the WKT Polygon format. WKT Polygon Format (Well-known Text) POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) However, since I will be representing data using JSON-LD, it may

How to externalize json-ld and include in html doc

前提是你 提交于 2019-12-21 07:12:13
问题 Is it possible to externalize json-ld and include it in an html document like this: <script type="text/javascript" src="http://www.example.com/data123.jsonld"></script> There doesn't seem to be any documentation about this online.... 回答1: You can't do that. You should get the json with an AJAX request. You can do it easy with jQuery JS $(function(){ $.getJSON("data123.jsonld", function(data) { $('.json').text(data); }); }); HTML <div class="json"></div> If your json file is not in your file

Duplicate JSON-LD scripts in head

蓝咒 提交于 2019-12-20 05:23:30
问题 I have to inject multiple script elements for JSON-LD data into the head of my application, all pertaining to the same @type . This is due to pulling in different fields from different data source. Will this duplication cause any problems? <script type="application/ld+json"> { "@type": "Organisation", "name": "John Smith" } </script> <script type="application/ld+json"> { "@type": "Organisation", "city": "London" } </script> I'm hoping this will be translated by Google as simply: <script type=

How to send structured email markup using Gmail API and Javascript?

邮差的信 提交于 2019-12-20 05:15:08
问题 I'm trying to build a Javascript app that uses Gmail's API to send emails (to myself) including the structured data needed for Gmail's Inbox to recognise a hotel reservation. The goal is to be able to enter details about the reservation in an HTML form and have the app send me an email than Inbox then recognises as a hotel reservation and adds a Trip bundle to my inbox. I followed a worked example, here, that uses Google Apps Scripts to send emails from my account to myself. The script pulls

JSON-LD to normal JSON

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 04:11:21
问题 I'm trying to insert a JSON-LD file into my CouchDB. The only problem I have is that when I insert my JSON-LD file, the resulting CouchDB is meaningless because the IDs aren't linked together. An example of what my JSON-LD file looks like: "contributor": [ { "@id": "_:N6e57c55b35b74782ada714fdc6d66bf1" }, { "@id": "_:N810e115dfb3348579a7b826a7548095b" } And another part: { "@id": "_:N6e57c55b35b74782ada714fdc6d66bf1", "@type": "Person", "label": "Isely, Duane, 1918-" }, { "@id": "_

Duplicate or link to WebSite JSON-LD?

谁都会走 提交于 2019-12-20 04:08:10
问题 I'm replacing the microdata ( itemscope et al) on our sites with JSON-LD. Do I need to declare the WebSite on every page, or can I place it once on the home page? If the latter, will processors (by which I mean Google) tie each page to it automatically via the domain name, or is there some way to link to it? Given that "Linked Data" is right there in the name, I've found no examples that make use of it. They all replicate or embed the data directly in the thing that's linking. For example, I

Schema.org: What to use, Microdata or JSON-LD?

吃可爱长大的小学妹 提交于 2019-12-20 02:59:05
问题 The data markup Schema.org for search sites like Google, Yahoo!, Bing and Yandex is great for snippets. However, I perceive that most of webmasters use Microdata and almost never use JSON-LD. I learned about JSON-LD recently and I have some doubts: Could I use it without compability problems with search engine? 回答1: There can’t be a general answer: Each consumer (search engine, tool, etc.) has its own conditions (what it supports for which feature). Each syntax (JSON-LD, Microdata, RDFa, etc.