Re: Visa Resource Center Schema

Nikias:

I get errors when I use @List in the example you provided.

Also, I have more examples to work on.  I think I need more vocabulary to
really articulate the travelActions.

Maybe you guys need to travel more :)

Alex


   - instrument [Thing]:
   - @list [Unspecified type]:
   - name:
   A Valid Passport
   - @list [Unspecified type]:
   - name:
   Pre-paid airline or bus ticket to exit Costa Rica
   - @list [Unspecified type]:
   - name:
   $100.00US dollars per every 30 calendar days you plan to stay in Costa
   Rica


On Fri, Aug 14, 2015 at 3:14 AM, Niklas Lindström <lindstream@gmail.com>
wrote:

> How about native JSON-LD lists (i.e. RDF collections) over ItemList
> whenever possible? That'd turn the above example into:
>
>     {
>       "@context": "http://schema.org",
>         "@type": "TravelAction",
>         "fromLocation": "USA",
>         "toLocation": "Costa Rica",
>         "name": "Travel from USA to Costa Rica",
>         "instrument": {
>           "@list": [
>             {"name": "A Valid Passport"},
>             {"name": "Pre-paid airline or bus ticket to exit Costa Rica"},
>             {"name": "$100.00US dollars per every 30 calendar days you
> plan to stay in Costa Rica"}
>           ]
>         },
>         "distance": "2000 miles"
>     }
>
> (For properties where the value is always expected to be a @list (and not
> a @set), the term can be defined in the @context, like: "instrument":
> {"@container": "@list"}, to omit the wrapping {"@list": [...]} construct.)
>
> (Also, in RDFa 1.1, the @inlist attribute is available for the same
> purpose.)
>
> Cheers,
> Niklas
>
> On Fri, Aug 14, 2015 at 12:12 AM, Thad Guidry <thadguidry@gmail.com>
> wrote:
>
>> Yikes!
>>
>> DanBri - Can we make this easier in the future somehow for folks ?
>>
>> Thad
>> +ThadGuidry <https://www.google.com/+ThadGuidry>
>>
>> On Thu, Aug 13, 2015 at 3:10 PM, Alex M <tech.guy415@gmail.com> wrote:
>>
>>> I wish plural would be easier ... well, it may not be what you expect,
>>> but this validates:
>>>
>>> <script type="application/ld+json">
>>> {
>>>   "@context":"http://schema.org",
>>>   "@type":"TravelAction",
>>>   "fromLocation": "USA",
>>>   "toLocation": "Costa Rica",
>>>   "name": "Travel from USA to Costa Rica",
>>>    "instrument": {
>>> "@type": "ItemList",
>>>     "numberOfItems": 3,
>>>     "itemListElement": [
>>>       {
>>>         "@type": "ListItem",
>>>         "position": 1,
>>>         "item": {
>>>           "name": "A Valid Passport"
>>>         }
>>>       },
>>>       {
>>>         "@type": "ListItem",
>>>         "position": 2,
>>>         "item": {
>>>           "name": "Pre-paid airline or bus ticket to exit Costa Rica"
>>>         }
>>>       },
>>>       {
>>>         "@type": "ListItem",
>>>         "position": 3,
>>>         "item": {
>>>           "name": "$100.00US dollars per every 30 calendar days you plan
>>> to stay in Costa Rica"
>>>         }
>>>     }
>>> ]},
>>>     "distance":"2000 miles"
>>>         }
>>>         }
>>> </script>
>>>
>>> On Thu, Aug 13, 2015 at 12:26 PM, Thad Guidry <thadguidry@gmail.com>
>>> wrote:
>>>
>>>> oh boy... ok...your thinking much later...
>>>> Let's start simple and work outwards and upwards from there....
>>>>
>>>> <script type="application/ld+json">
>>>> {
>>>>   "@context":"http://schema.org",
>>>>   "@type":"TravelAction",
>>>>   "fromLocation": "USA",
>>>>   "toLocation": "Costa Rica",
>>>>   "name": "Travel from USA to Costa Rica",
>>>>    "instrument": {"name": "A Valid Passport"},
>>>>     "distance":"2000 miles"
>>>>         }
>>>> </script>
>>>>
>>>>
>>>> Thad
>>>> +ThadGuidry <https://www.google.com/+ThadGuidry>
>>>>
>>>> On Thu, Aug 13, 2015 at 9:44 AM, Alex M <tech.guy415@gmail.com> wrote:
>>>>
>>>>> Here is my first attempt to do it on a JSON TD style, but very simple
>>>>> and basic.  I am getting three errors and perhaps it is that I do not quite
>>>>> understand how to extend one schema to the other.  Any help is welcome.  I
>>>>> get three errors.
>>>>>
>>>>> <script type="application/ld+json">
>>>>> {
>>>>>   "@context":"http://schema.org",
>>>>>   "@type":"TravelAction",
>>>>>   "fromLocation": "USA",
>>>>>   "toLocation": "Costa Rica",
>>>>>
>>>>>   #ERROR //Thing is not a known valid target type for the name
>>>>> property.
>>>>> You can see here that THING has NAME http://schema.org/Thing
>>>>>
>>>>>   "name": {
>>>>>   "@type":"Thing",
>>>>> #ERROR//The property about is not recognized by Google for an object
>>>>> of type Thing.
>>>>> YOu can see here that THING has ABOUT http://schema.org/Thing
>>>>>       "about":"Costa Rica Required Entry and Transit Documents"
>>>>>       },
>>>>>     #ERROR  //The property itemListElement is not recognized by Google
>>>>> for an object of type TravelAction.
>>>>> This should be from THING so it is probably my syntax.
>>>>>
>>>>>    "itemListElement":
>>>>>   [
>>>>>   {
>>>>>    "@type": "ListItem",
>>>>>    "position": 1,
>>>>>   "item":
>>>>>    {
>>>>>     "name": "A Valid Passport"
>>>>>     },
>>>>>     "@type": "ListItem",
>>>>>    "position": 2,
>>>>>   "item":
>>>>>    {
>>>>>     "name": "Pre-paid airline or bus ticket to exit Costa Rica"
>>>>>     },
>>>>>     "@type": "ListItem",
>>>>>    "position": 3,
>>>>>   "item":
>>>>>    {
>>>>>     "name": "$100.00US dollars per every 30 calendar days you plan to
>>>>> stay in Costa Rica"
>>>>>     }
>>>>>     }
>>>>>     ]
>>>>>     }
>>>>>
>>>>> </script>
>>>>>
>>>>> On Wed, Aug 12, 2015 at 3:59 PM, Thad Guidry <thadguidry@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Ooops typo !  this is better :
>>>>>> http://www.w3.org/TR/json-ld/#embedding-json-ld-in-html-documents
>>>>>>
>>>>>> Thad
>>>>>> +ThadGuidry <https://www.google.com/+ThadGuidry>
>>>>>>
>>>>>> On Wed, Aug 12, 2015 at 4:58 PM, Thad Guidry <thadguidry@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> The answer is easy !  Just spend 3 hours reading the full official
>>>>>>> documentation thus far !
>>>>>>>
>>>>>>> Or skip directly to the answers your looking for provided by me:
>>>>>>>
>>>>>>> http://www.w3.org/TR/json-ld/#interpreting-json-as-json-ld
>>>>>>>
>>>>>>> http://www.w3.org/TR/json-ld/#embedding-json-ld-in-htmls-documents
>>>>>>>
>>>>>>> As well as visiting the awesomeness that is:
>>>>>>> http://json-ld.org/learn.html
>>>>>>>
>>>>>>>
>>>>>>> Thad
>>>>>>> +ThadGuidry <https://www.google.com/+ThadGuidry>
>>>>>>>
>>>>>>> On Wed, Aug 12, 2015 at 4:25 PM, Alex M <tech.guy415@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Is the script placed inside the <head> tag or before the </body>?
>>>>>>>>
>>>>>>>> On Wed, Aug 12, 2015 at 3:21 PM, Thad Guidry <thadguidry@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> JSON_LD is a preference (whenever you can accomplish that.) :)
>>>>>>>>>
>>>>>>>>> Thad
>>>>>>>>> +ThadGuidry <https://www.google.com/+ThadGuidry>
>>>>>>>>>
>>>>>>>>> On Wed, Aug 12, 2015 at 4:20 PM, Alex M <tech.guy415@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Is it better to do this on the HTML mark up or on JSON-LD?  Does
>>>>>>>>>> it fulfill the same purpose or for search engines is better the HTML markup?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Received on Wednesday, 26 August 2015 02:40:59 UTC