Last active
August 8, 2016 17:43
-
-
Save science/4f351ee1e9e4a476d291 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Signed LR v2 envelope | |
# nb. `resource` = JWT encoded version of LR v2 envelope below | |
# resource_format can must be one of: "json" or "xml in json" | |
{ | |
"@context": "http://learningregistry.org/schemas/v2/envelope", | |
"envelope_type": "resource_data", | |
"envelope_version": "1.0.0", | |
"envelope_id": "[URN or similar]", | |
"envelope_community": "[LearningRegistry|CredentialRegistry]", | |
"resource": "[resource serialized as string]", | |
"resource_format": "json", | |
"resource_encoding": "jwt", | |
"resource_public_key": "[key]" | |
} | |
# LR v2 payload in JSON-LD | |
# nb. This is just a json-ld schema.org/lrmi entity. But we've added | |
# a schema extension to include Learning Registry envelope elements. | |
# This approach could be applied to an xml XSD namespace extension as well | |
# The `resource` field above will include a JWT encoded string. The payload of that JWT will be: | |
{ | |
"@id": "http://docsteach.org/activities/16/detail", | |
"@type": "CreativeWork", | |
"name": "The Constitution at Work", | |
"thumbnailUrl": "http://docsteach.org/assets/lesson/000/000/022/22_medium.jpg", | |
"url": "http://docsteach.org/activities/16/detail", | |
"description": "In this activity students will analyze documents that span the course of American history to determine their connection to the U.S. Constitution. Students will then make connections between the documents they have examined and the big ideas found within the Constitution.", | |
"typicalAgeRange": "13-18", | |
"keywords": "History", | |
"educationalAlignment": [ | |
{ | |
"@type": "AlignmentObject", | |
"alignmentType": "educationLevel", | |
"educationalFramework": "US K-12 Grade Levels", | |
"targetName": "8-12" | |
}, | |
{ | |
"@type": "AlignmentObject", | |
"alignmentType": "assesses", | |
"educationalFramework": "Common Core State Standards for English Language Arts", | |
"targetName": "CCSS.ELA-Literacy.RH.6-8.1", | |
"targetUrl": "http://corestandards.org/ELA-Literacy/RH/6-8/1" | |
}, | |
{ | |
"@type": "AlignmentObject", | |
"alignmentType": "teaches", | |
"educationalFramework": "Common Core State Standards for English Language Arts", | |
"targetName": "CCSS.ELA-Literacy.RH.6-8.1", | |
"targetUrl": "http://corestandards.org/ELA-Literacy/RH/6-8/1" | |
}, | |
{ | |
"@type": "AlignmentObject", | |
"alignmentType": "requires", | |
"educationalFramework": "Common Core State Standards for English Language Arts", | |
"targetName": "CCSS.ELA-Literacy.RH.6-8.1", | |
"targetUrl": "http://corestandards.org/ELA-Literacy/RH/6-8/1" | |
} | |
], | |
"dateCreated": "2010-05-20", | |
"dateModified": "2015-11-24", | |
"language": "English", | |
"mediaType": [ | |
"Document", | |
" Image" | |
], | |
"learningResourceType": "learning activity", | |
"interactivityType": "Interactive", | |
"useRightsUrl": "https://creativecommons.org/publicdomain/zero/1.0/", | |
"accessRights": "https://ceds.ed.gov/element/001561#FreeAccess", | |
"author": { | |
"@type": "Organization", | |
"name": "National Archives Education Team", | |
"url": "http://www.archives.gov/education/", | |
"email": "[email protected]" | |
}, | |
"publisher": { | |
"@type": "Organization", | |
"name": "National Archives and Records Administration", | |
"url": "http://www.archives.gov", | |
"email": "[email protected]" | |
}, | |
"accessibilityFeature": "alternativeText", | |
"accessibilityHazard": [ | |
"noFlashingHazzard", | |
" noMotionSimulationHazzard", | |
" noSoundHazzard" | |
], | |
"learningRegistryMetadata": { | |
"digital_signature": { | |
"key_location": ["http://goopen.sandbox.learningregistry.net/pubkey"] | |
}, | |
"keys": [ | |
"EZPublish-1.5", | |
"EZPublish" | |
], | |
"TOS": { | |
"submission_TOS": "http://www.learningregistry.org/tos" | |
}, | |
"payload_placement": "json-ld embedded", | |
"identity": { | |
"submitter": "joe hobson <[email protected]>", | |
"signer": "Alpha Node (Resource Data Signing Key) <[email protected]>", | |
"submitter_type": "user" | |
}, | |
"original_envelope": "[string with original LR 1.0 envelope, if available]" | |
}, | |
"@context": [ | |
{ | |
"@vocab": "http://schema.org/", | |
"url": { | |
"@type": "@id" | |
} | |
}, | |
{ | |
"lrmi": "http://lrmi.net/the-specification#", | |
"useRightsUrl": { | |
"@id": "lrmi:useRightsUrl", | |
"@type": "@id" | |
} | |
}, | |
{ | |
"learningregistry": "http://learningregistry.org/schemas/v2/resource", | |
"learningRegistryMetadata": { | |
"@id": "learningregistry:learningRegistryMetadata", | |
"@type": "@id" | |
} | |
} | |
] | |
} |
The resource_format
is designed to let people stuff xml into the jwt using a proprietary method - probably something like:
{"value": "string serialized xml"}
..Or something like that.
resource_encoding
is there to potentially let us use other encodings in the future (and also to possibly just stuff an entire LR 1.0 envelope into resource
with some value, e.g. "lr-051.0").
Input welcome!
Just to keep track. The updated version, with properties description, is here: https://github.com/learningtapestry/metadataregistry/blob/master/docs/samples/learning-registry.md
I've also tested that this sample validates properly with our json-schema.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So quick questions and thoughts.
Should this not be:
where:
of which I'm then not sure why you need both "resource_format" and "resource_encoding".