valueflows / agent

agent has moved to https://lab.allmende.io/valueflows/agent
10 stars 4 forks source link

minimal JSON-LD context and example of a Person #24

Closed elf-pavlik closed 8 years ago

elf-pavlik commented 8 years ago

Please don't merge yet!

I propose to start with minimal context which includes only terms used in examples (which I still didn't do it this PR)

Also all examples SHOULD link to JSON-LD Playground, for examples working link using my fork of his repo

fosterlynn commented 8 years ago

OK cool, I missed that activity streams has "context", and the definition is pretty close - broader but that seems like a good idea as I think about it. And startDate and endDate, excellent.

And I agree with you on the playground, I was too tired but wanted to get something out there for discussion. :frowning: I'll see if I can figure out how your link works with the rawgit....

elf-pavlik commented 8 years ago

you can visit https://rawgit.com/ and give it github link like https://github.com/openvocab/agent/blob/master/context.jsonld

it will give you dev/testing link like https://rawgit.com/openvocab/agent/master/context.jsonld

which has proper CORS headers and even requested Content-Type

curl -i -H "Accept: application/ld+json"  https://rawgit.com/openvocab/agent/master/context.jsonld

in JSON-LD playground you can click on Compacted tab and provide URLs for document and context, then you also can click Permalink to get URL which will pre-populate those two input fields.

elf-pavlik commented 8 years ago

@fosterlynn @ahdinosaur what do you think about

  1. only adding to the JSON-LD context terms which we use in examples included in openvocab repositories
  2. automate validation of JSON-LD context (one in openvocab.github.io doesn't validate as JSON or JSON-LD even after fixing syntax errors!)
  3. each example has link to load it in JSON-LD Playground
fosterlynn commented 8 years ago

@elf-pavlik @ahdinosaur I agree with your suggestions, elf.

(Sorry about my admittedly lame @context - happy to merge your pull request when you are ready... although sometimes it's good to get things going too.... :wink: but yes, the discipline is good, thanks! There are a few missing things still, which we can add, and which will need to go in the examples too.)

elf-pavlik commented 8 years ago

There are a few missing things still, which we can add, and which will need to go in the examples too.

I will add some commits for included example here, to make sure that we do NOT include in JSON-LD context any term not used in at least one example. Similar to proper BDD/TDD - not writing any implementation code which doesn't make failing test pass :traffic_light:

ahdinosaur commented 8 years ago

@elf-pavlik :+1:

elf-pavlik commented 8 years ago

ready to merge! examples in JSON-LD Playground

please make sure to take a look at both Expanded and Compacted tabs :exclamation: