{"action":"created","issue":{"url":"https://api.github.com/repos/OADA/oada-api-server/issues/5","labels_url":"https://api.github.com/repos/OADA/oada-api-server/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/OADA/oada-api-server/issues/5/comments","events_url":"https://api.github.com/repos/OADA/oada-api-server/issues/5/events","html_url":"https://github.com/OADA/oada-api-server/issues/5","id":108510854,"number":5,"title":"Arrays in resources are broken","user":{"login":"abalmos","id":1865093,"avatar_url":"https://avatars.githubusercontent.com/u/1865093?v=3","gravatar_id":"","url":"https://api.github.com/users/abalmos","html_url":"https://github.com/abalmos","followers_url":"https://api.github.com/users/abalmos/followers","following_url":"https://api.github.com/users/abalmos/following{/other_user}","gists_url":"https://api.github.com/users/abalmos/gists{/gist_id}","starred_url":"https://api.github.com/users/abalmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abalmos/subscriptions","organizations_url":"https://api.github.com/users/abalmos/orgs","repos_url":"https://api.github.com/users/abalmos/repos","events_url":"https://api.github.com/users/abalmos/events{/privacy}","received_events_url":"https://api.github.com/users/abalmos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OADA/oada-api-server/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"aultac","id":3449424,"avatar_url":"https://avatars.githubusercontent.com/u/3449424?v=3","gravatar_id":"","url":"https://api.github.com/users/aultac","html_url":"https://github.com/aultac","followers_url":"https://api.github.com/users/aultac/followers","following_url":"https://api.github.com/users/aultac/following{/other_user}","gists_url":"https://api.github.com/users/aultac/gists{/gist_id}","starred_url":"https://api.github.com/users/aultac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aultac/subscriptions","organizations_url":"https://api.github.com/users/aultac/orgs","repos_url":"https://api.github.com/users/aultac/repos","events_url":"https://api.github.com/users/aultac/events{/privacy}","received_events_url":"https://api.github.com/users/aultac/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-09-27T03:34:59Z","updated_at":"2015-09-29T03:10:30Z","closed_at":null,"body":"Consider the valleyix dbsetup and the path: \r\nhttps://localhost:3000/bookmarks/irrigation/machines/list/0928sdfk9j/configuration\r\n\r\nThe `oada-formats` example for this mediatype has `EndGunList` as an array. It appears `oada-api-server` is turning it into an object. I traced it as far as I could and it seems that the resource that is `put` to the db handler has an array for `EndGnuList` "},"comment":{"url":"https://api.github.com/repos/OADA/oada-api-server/issues/comments/143930763","html_url":"https://github.com/OADA/oada-api-server/issues/5#issuecomment-143930763","issue_url":"https://api.github.com/repos/OADA/oada-api-server/issues/5","id":143930763,"user":{"login":"aultac","id":3449424,"avatar_url":"https://avatars.githubusercontent.com/u/3449424?v=3","gravatar_id":"","url":"https://api.github.com/users/aultac","html_url":"https://github.com/aultac","followers_url":"https://api.github.com/users/aultac/followers","following_url":"https://api.github.com/users/aultac/following{/other_user}","gists_url":"https://api.github.com/users/aultac/gists{/gist_id}","starred_url":"https://api.github.com/users/aultac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aultac/subscriptions","organizations_url":"https://api.github.com/users/aultac/orgs","repos_url":"https://api.github.com/users/aultac/repos","events_url":"https://api.github.com/users/aultac/events{/privacy}","received_events_url":"https://api.github.com/users/aultac/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T03:10:30Z","updated_at":"2015-09-29T03:10:30Z","body":"I will track down why it's ending up as an object instead of an array.  On a related note, the server does not currently support storing arrays as top-level resources since they need _id, _rev, and _meta in them.  I'm going to make the resources-handler wrap top-level arrays with an object and then extract the array on GET's.  This should not affect storing arrays as sub-keys, which should have already been working.  I will add tests for this as well."}}