{"action":"created","issue":{"url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/164","repository_url":"https://api.github.com/repos/jsonld-java/jsonld-java","labels_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/164/comments","events_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/164/events","html_url":"https://github.com/jsonld-java/jsonld-java/issues/164","id":132276969,"number":164,"title":"Compaction appears to produce invalid JSON-LD","user":{"login":"jeff303","id":3521562,"avatar_url":"https://avatars.githubusercontent.com/u/3521562?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff303","html_url":"https://github.com/jeff303","followers_url":"https://api.github.com/users/jeff303/followers","following_url":"https://api.github.com/users/jeff303/following{/other_user}","gists_url":"https://api.github.com/users/jeff303/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff303/subscriptions","organizations_url":"https://api.github.com/users/jeff303/orgs","repos_url":"https://api.github.com/users/jeff303/repos","events_url":"https://api.github.com/users/jeff303/events{/privacy}","received_events_url":"https://api.github.com/users/jeff303/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-08T22:37:03Z","updated_at":"2016-02-08T22:42:05Z","closed_at":"2016-02-08T22:41:35Z","body":"Consider the following JSON-LD, which represents a [http://schema.org/Event](http://schema.org/Event).  It includes some standard attributes of the Event, as well as some custom application-specific attributes (all within the `http://www.example.com` namespace).\r\n\r\n`{\"http://www.example.com/environment\":\"JUnit\",\"@id\":\"http://www.example.com/EVENT/1234\",\"http://www.example.com/baseWebUrl\":\"http://dummy.com/\",\"http://www.example.com/brand\":null,\"http://www.example.com/resourceType\":\"EVENT\",\"http://www.example.com/id\":\"1234\",\"@context\":{\"so\":\"http://schema.org/\"},\"@type\":\"so:Event\",\"so:name\":\"Test Single Event\",\"so:startDate\":\"2015-03-12T19:00:00-0500\",\"so:endDate\":\"2015-03-12T19:30:00-0500\",\"so:location\":{\"@type\":\"so:Place\",\"so:address\":{\"@type\":\"so:PostalAddress\",\"so:name\":\"Somewhere\"}},\"so:publisher\":{\"@type\":\"so:Organization\",\"so:name\":null},\"so:url\":\"http://dummy.com/Main/Apps/Calendar\",\"http://www.example.com/eventId\":\"1234\",\"http://www.example.com/eventUid\":\"EVENT_UID_1\"}`\r\n\r\nWhen I pass this through the JSON-LD Java compaction call, with the context parameter being a single array containing http://schema.org and the JsonLdOptions being the default but with compactArrays=true and base=http://schema.org, then I get the following output:\r\n\r\n`{\"id\":\"http://www.example.com/EVENT/1234\",\"type\":\"Event\",\"schema:endDate\":\"2015-03-12T19:30:00-0500\",\"location\":{\"type\":\"Place\",\"address\":{\"type\":\"PostalAddress\",\"name\":\"Somewhere\"}},\"name\":\"Test Single Event\",\"publisher\":{\"type\":\"Organization\"},\"schema:startDate\":\"2015-03-12T19:00:00-0500\",\"schema:url\":\"http://dummy.com/Main/Apps/Calendar\",\"http://www.example.com/baseWebUrl\":\"http://dummy.com/\",\"http://www.example.com/environment\":\"JUnit\",\"http://www.example.com/eventId\":\"1234\",\"http://www.example.com/eventUid\":\"EVENT_UID_1\",\"http://www.example.com/id\":\"1234\",\"http://www.example.com/resourceType\":\"EVENT\",\"@context\":\"http://schema.org\"}`\r\n\r\nNotice that the at symbols in front of all the `@id` and `@type` attributes have disappeared.  Also, an unmapped prefix called simply `schema` has been introduced somehow.\r\n\r\nMy intent is to produce something valid that can be used with Gmail for the RSVP action, as documented [here](https://developers.google.com/gmail/markup/reference/rsvp-action).  The extra domain-specific attributes do not caused a problem for Gmail, but the issues with the output described above certainly do (it isn't able to parse out any of the types or essential attributes to render the event).  \r\n\r\nAny idea what I'm doing wrong?  This is for jsonld-java version 0.7.0.  The online JSON-LD playground appears to do the correct thing, as seen [here](http://json-ld.org/playground/#startTab=tab-compacted&json-ld=%7B%22http%3A%2F%2Fwww.example.com%2Fenvironment%22%3A%22JUnit%22%2C%22%40id%22%3A%22http%3A%2F%2Fwww.example.com%2FEVENT%2F1234%22%2C%22http%3A%2F%2Fwww.example.com%2FbaseWebUrl%22%3A%22http%3A%2F%2Fdummy.com%2F%22%2C%22http%3A%2F%2Fwww.example.com%2Fbrand%22%3Anull%2C%22http%3A%2F%2Fwww.example.com%2FresourceType%22%3A%22EVENT%22%2C%22http%3A%2F%2Fwww.example.com%2Fid%22%3A%221234%22%2C%22%40context%22%3A%7B%22so%22%3A%22http%3A%2F%2Fschema.org%2F%22%7D%2C%22%40type%22%3A%22so%3AEvent%22%2C%22so%3Aname%22%3A%22Test%20Single%20Event%22%2C%22so%3AstartDate%22%3A%222015-03-12T19%3A00%3A00-0500%22%2C%22so%3AendDate%22%3A%222015-03-12T19%3A30%3A00-0500%22%2C%22so%3Alocation%22%3A%7B%22%40type%22%3A%22so%3APlace%22%2C%22so%3Aaddress%22%3A%7B%22%40type%22%3A%22so%3APostalAddress%22%2C%22so%3Aname%22%3A%22Somewhere%22%7D%7D%2C%22so%3Apublisher%22%3A%7B%22%40type%22%3A%22so%3AOrganization%22%2C%22so%3Aname%22%3Anull%7D%2C%22so%3Aurl%22%3A%22http%3A%2F%2Fdummy.com%2FMain%2FApps%2FCalendar%22%2C%22http%3A%2F%2Fwww.example.com%2FeventId%22%3A%221234%22%2C%22http%3A%2F%2Fwww.example.com%2FeventUid%22%3A%22EVENT_UID_1%22%7D&context=%5B%22http%3A%2F%2Fschema.org%22%5D).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/comments/181604794","html_url":"https://github.com/jsonld-java/jsonld-java/issues/164#issuecomment-181604794","issue_url":"https://api.github.com/repos/jsonld-java/jsonld-java/issues/164","id":181604794,"user":{"login":"jeff303","id":3521562,"avatar_url":"https://avatars.githubusercontent.com/u/3521562?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff303","html_url":"https://github.com/jeff303","followers_url":"https://api.github.com/users/jeff303/followers","following_url":"https://api.github.com/users/jeff303/following{/other_user}","gists_url":"https://api.github.com/users/jeff303/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff303/subscriptions","organizations_url":"https://api.github.com/users/jeff303/orgs","repos_url":"https://api.github.com/users/jeff303/repos","events_url":"https://api.github.com/users/jeff303/events{/privacy}","received_events_url":"https://api.github.com/users/jeff303/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T22:42:04Z","updated_at":"2016-02-08T22:42:04Z","body":"Correction: looking more closely at the playground output, it's doing the same things.  So clearly, I just don't understand what is going on with compaction and need to research that further."}}