{ "info": { "author": "LOGILAB S.A. (Paris, FRANCE)", "author_email": "contact@logilab.fr", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: CubicWeb", "Programming Language :: JavaScript", "Programming Language :: Python" ], "description": "Summary\n-------\n\njsonld_ views for cubicweb\n\n.. _jsonld: http://www.w3.org/TR/json-ld/\n\n\nViews\n-----\n\nThis cube provides a ``jsonld`` view with two different implementations.\n\njsonld for CWEType\n``````````````````\n\nThe ``jsonld`` view for ``CWEType`` entities is accessible either\nexplicitly or through the ``BASE_URL/.jsonld`` url. It provides\nschema information using the jsonld specification.\n\nAssuming you have the following schema declaration::\n\n class Person(EntityType):\n name = String()\n age = Int()\n birthdate = Date()\n\nThe corresponding jsonld output will be::\n\n {\n \"@context\": {\n \"xsd\": \"http://www.w3.org/2001/XMLSchema#\",\n \"creation_date\": {\n \"@id\": \"https://my-app.org/CWRType/creation_date\",\n \"@type\": \"xsd:dateTime\"\n },\n \"modification_date\": {\n \"@id\": \"https://my-app.org/CWRType/modification_date\",\n \"@type\": \"xsd:dateTime\"\n },\n \"cwuri\": {\n \"@id\": \"https://my-app.org/CWRType/cwuri\",\n \"@type\": \"@id\"\n },\n \"eid\": {\n \"@id\": \"https://my-app.org/CWRType/eid\",\n \"@type\": \"xsd:integer\"\n },\n \"name\": {\n \"@id\": \"https://my-app.org/CWAttribute/278\",\n \"@type\": \"xsd:string\"\n },\n \"age\": {\n \"@id\": \"https://my-app.org/CWAttribute/281\",\n \"@type\": \"xsd:string\"\n },\n \"birthdate\": {\n \"@id\": \"https://my-app.org/CWAttribute/301\",\n \"@type\": \"xsd:date\"\n }\n }\n }\n\njsonld for any rset\n````````````````````\n\nThis view is somewhat similar to the standard ``jsonexport`` one\nwith two main differences:\n\n- it provides resultset metadata alongside the actual data and\n tries to be as close as possible to the general shape of the\n sparql-results-json_ format,\n\n- each cell is exposed as a \"jsonld\" object. Entities expose\n all their attributes and dc properties, \"final\" values expose\n their type and value.\n\n.. _sparql-results-json: http://www.w3.org/TR/sparql11-results-json/\n\n\nConsidering the RQL query ``Any P,N LIMIT 2 WHERE P is Person, P name N``,\nthe jsonld output would look like::\n\n {\n \"@context\": {\n \"cw\": \"http://ns.cubicweb.org/cubicweb/0.0/\",\n \"xsd\": \"http://www.w3.org/2001/XMLSchema#\",\n \"dcterms\": \"http://purl.org/dc/terms/\",\n \"myapp\": \"https://my-app.org/CWEType/\"\n },\n \"cw:head\": {\n \"rql\": \"Any P,N LIMIT 2 WHERE P is Person, P name N\",\n \"vars\": [\"P\", \"N\"],\n \"limit\": 2\n },\n \"cw:results\": [\n [{\n \"@context\": \"https://my-app.org/Person.jsonld\",\n \"@type\": \"myapp:Person\",\n \"cwuri\": \"https://my-app.org/1234\",\n \"name\": \"John\",\n \"age\": 42,\n \"birthdate\": \"2013/01/01\",\n \"creation_date\": \"2009/08/07 15:20:30\",\n \"modification_date\": \"2009/08/05 11:12:24\",\n \"eid\": 1234,\n \"dcterms:title\": \"the result of p.dc_title() on John\",\n \"dcterms:description\": null\n },\n {\n \"@type\": \"xsd:string\",\n \"@value\": \"John\"\n }],\n [{\n \"@context\": \"https://my-app.org/Person.jsonld\",\n \"@type\": \"myapp:Person\",\n \"cwuri\": \"https://my-app.org/4321\",\n \"name\": \"Mary\",\n \"age\": 40,\n \"birthdate\": \"2015/02/02\",\n \"creation_date\": \"2014/01/02 11:30:20\",\n \"modification_date\": \"2015/01/05 12:24:11\",\n \"eid\": 4321,\n \"dcterms:title\": \"the result of p.dc_title() on Mary\",\n \"dcterms:description\": null\n },\n {\n \"@type\": \"xsd:string\",\n \"@value\": \"Mary\"\n }]\n ]\n }", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.cubicweb.org/project/cubicweb-jsonld", "keywords": null, "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "cubicweb-jsonld", "package_url": "https://pypi.org/project/cubicweb-jsonld/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cubicweb-jsonld/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.cubicweb.org/project/cubicweb-jsonld" }, "release_url": "https://pypi.org/project/cubicweb-jsonld/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "jsonld views for cubicweb", "version": "0.1.0" }, "last_serial": 1578831, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "57f7d3ee1da74ad2ce386c221c5272e3", "sha256": "b1a1f9759dc69405fae26d0fe11d4156990a120cdc5655e3058bbcee805939c4" }, "downloads": -1, "filename": "cubicweb-jsonld-0.1.0.tar.gz", "has_sig": false, "md5_digest": "57f7d3ee1da74ad2ce386c221c5272e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9587, "upload_time": "2015-06-04T21:16:30", "url": "https://files.pythonhosted.org/packages/97/8c/95ff91435f7d1b52b2fc027041d2e676beca42a425ca656641f348377af4/cubicweb-jsonld-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "57f7d3ee1da74ad2ce386c221c5272e3", "sha256": "b1a1f9759dc69405fae26d0fe11d4156990a120cdc5655e3058bbcee805939c4" }, "downloads": -1, "filename": "cubicweb-jsonld-0.1.0.tar.gz", "has_sig": false, "md5_digest": "57f7d3ee1da74ad2ce386c221c5272e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9587, "upload_time": "2015-06-04T21:16:30", "url": "https://files.pythonhosted.org/packages/97/8c/95ff91435f7d1b52b2fc027041d2e676beca42a425ca656641f348377af4/cubicweb-jsonld-0.1.0.tar.gz" } ] }