Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-LD API response contains meta information #5

Open
almereyda opened this issue Mar 17, 2017 · 0 comments
Open

JSON-LD API response contains meta information #5

almereyda opened this issue Mar 17, 2017 · 0 comments

Comments

@almereyda
Copy link

almereyda commented Mar 17, 2017

For a JSON-LD document to be accessible on the Web of Data, it must expose directly to its URL.
Currently meta, entities and id keys are exposed, which break the direct parsing of the document.

Example:

$ curl -s https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451/?format=schema | jq .
{
  "meta": {
    "limit": 1
  },
  "entities": {
    "55cf123fe41d7544778b1451": {
      "@context": "http://schema.org",
      "@type": "Organization",
      "id": "https://www.communecter.org/data/get/type/organizations/id/55cf123fe41d7544778b1451/format/schema",
      "name": "Géo Organique",
      "address": {
        "@type": "PostalAddress",
        "@id": "https://www.communecter.org/data/get/type/city/insee/63456/format/schema",
        "addressLocality": "VICHEL",
        "postalCode": "63340",
        "streetAddress": "12, chemin du Busquet"
      },
      "email": "geo@spatiogis.fr",
      "url": "http://wiki.cheznous.coop/geoorganique"
    }
  }
}

which should only read as

$ curl -s https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451/?format=schema | jq ".entities | to_entries[].value"
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "id": "https://www.communecter.org/data/get/type/organizations/id/55cf123fe41d7544778b1451/format/schema",
  "name": "Géo Organique",
  "address": {
    "@type": "PostalAddress",
    "@id": "https://www.communecter.org/data/get/type/city/insee/63456/format/schema",
    "addressLocality": "VICHEL",
    "postalCode": "63340",
    "streetAddress": "12, chemin du Busquet"
  },
  "email": "geo@spatiogis.fr",
  "url": "http://wiki.cheznous.coop/geoorganique"
}
@almereyda almereyda changed the title API response contains meta information JSON-LD API response contains meta information Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant