{"action":"created","issue":{"url":"https://api.github.com/repos/NICTA/nationalmap/issues/576","labels_url":"https://api.github.com/repos/NICTA/nationalmap/issues/576/labels{/name}","comments_url":"https://api.github.com/repos/NICTA/nationalmap/issues/576/comments","events_url":"https://api.github.com/repos/NICTA/nationalmap/issues/576/events","html_url":"https://github.com/NICTA/nationalmap/issues/576","id":59749669,"number":576,"title":"Allow fields in init.json files to internally reference values","user":{"login":"axman6","id":39567,"avatar_url":"https://avatars.githubusercontent.com/u/39567?v=3","gravatar_id":"","url":"https://api.github.com/users/axman6","html_url":"https://github.com/axman6","followers_url":"https://api.github.com/users/axman6/followers","following_url":"https://api.github.com/users/axman6/following{/other_user}","gists_url":"https://api.github.com/users/axman6/gists{/gist_id}","starred_url":"https://api.github.com/users/axman6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axman6/subscriptions","organizations_url":"https://api.github.com/users/axman6/orgs","repos_url":"https://api.github.com/users/axman6/repos","events_url":"https://api.github.com/users/axman6/events{/privacy}","received_events_url":"https://api.github.com/users/axman6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-04T04:42:58Z","updated_at":"2015-03-04T04:59:49Z","closed_at":null,"body":"For one of the datasets we're working with, we have 24 layers which should all have the same description when clicking on the info button for the layer. We'd like to be able to place a description on the group which contains all the layers (or in our case, the group which contains the groups of layers), and be able to reference that from each layer. After speaking with @kring, the initial design we've come up with so far looks something like:\r\n\r\n```json\r\n{\r\n  \"name\": \"Group\",\r\n  \"type\": \"group\",\r\n  \"description\": \"Hopefully this description is inherited\",\r\n  \"items\": [\r\n    {\r\n      \"name\": \"Subgroup\",\r\n      \"type\": \"group\",\r\n      \"items\": [\r\n        {\r\n          \"name\": \"Layer 1\",\r\n          \"description\": {\"$jref\":\"../../description\"},\r\n          \"description2\": {\"$jref\":\"../../../../description\"},\r\n          \"dataCustodian\": \"Someone Inc.\",\r\n          \"type\": \"kml\",\r\n          \"url\": \"foo.kmz\",\r\n          \"rectangle\": [\r\n            \"137.0\",\r\n            \"-39.5\",\r\n            \"154.0\",\r\n            \"-18.5\"\r\n          ]\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nIt's not clear which path (description or descriotion2) would be the correct one here; it would depend on whether there is also support for indexing into an array:\r\n\r\n```json\r\n...\r\n\"description\":{\"$jref\": \"../0/description\"},\r\n...\r\n```\r\nmay be used to point to the description of the first layer in the array of items.\r\n\r\nI believe that something like \"$jref\" should be used instead of \"$ref\" because I'm not sure that this behaves in the same was as the [proposed son reference syntax](https://tools.ietf.org/html/draft-zyp-json-schema-03)."},"comment":{"url":"https://api.github.com/repos/NICTA/nationalmap/issues/comments/77097473","html_url":"https://github.com/NICTA/nationalmap/issues/576#issuecomment-77097473","issue_url":"https://api.github.com/repos/NICTA/nationalmap/issues/576","id":77097473,"user":{"login":"kring","id":924374,"avatar_url":"https://avatars.githubusercontent.com/u/924374?v=3","gravatar_id":"","url":"https://api.github.com/users/kring","html_url":"https://github.com/kring","followers_url":"https://api.github.com/users/kring/followers","following_url":"https://api.github.com/users/kring/following{/other_user}","gists_url":"https://api.github.com/users/kring/gists{/gist_id}","starred_url":"https://api.github.com/users/kring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kring/subscriptions","organizations_url":"https://api.github.com/users/kring/orgs","repos_url":"https://api.github.com/users/kring/repos","events_url":"https://api.github.com/users/kring/events{/privacy}","received_events_url":"https://api.github.com/users/kring/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T04:59:49Z","updated_at":"2015-03-04T04:59:49Z","body":"Yep, that shouldn't be a problem.  I just find all those `../`'s unwieldy."}}