{"action":"created","issue":{"url":"https://api.github.com/repos/gaelcolas/Datum/issues/39","repository_url":"https://api.github.com/repos/gaelcolas/Datum","labels_url":"https://api.github.com/repos/gaelcolas/Datum/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/gaelcolas/Datum/issues/39/comments","events_url":"https://api.github.com/repos/gaelcolas/Datum/issues/39/events","html_url":"https://github.com/gaelcolas/Datum/issues/39","id":303318104,"number":39,"title":"Datum Arrays with single items do not stay as arrays","user":{"login":"rdbartram","id":16256546,"avatar_url":"https://avatars0.githubusercontent.com/u/16256546?v=4","gravatar_id":"","url":"https://api.github.com/users/rdbartram","html_url":"https://github.com/rdbartram","followers_url":"https://api.github.com/users/rdbartram/followers","following_url":"https://api.github.com/users/rdbartram/following{/other_user}","gists_url":"https://api.github.com/users/rdbartram/gists{/gist_id}","starred_url":"https://api.github.com/users/rdbartram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdbartram/subscriptions","organizations_url":"https://api.github.com/users/rdbartram/orgs","repos_url":"https://api.github.com/users/rdbartram/repos","events_url":"https://api.github.com/users/rdbartram/events{/privacy}","received_events_url":"https://api.github.com/users/rdbartram/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-08T01:04:55Z","updated_at":"2018-03-13T00:21:38Z","closed_at":null,"author_association":"NONE","body":"Hey Gael,\r\n\r\nwith Resolve-DatumPath line 34:\r\n\r\n`$PathItem = ($CurrentNode.$($ExecutionContext.InvokeCommand.ExpandString($StackItem)))`\r\n\r\nThis is breaking my merges as I want to add a single hashtable to an array of hashtables.\r\n\r\nMaybe I'm doing something wrong but when I run Get-FileProviderData in PowerShell, it maintains the object as an array. However, when I run the Resolve-DatumPath or Resolve-NodeProperty then it loses its original type.\r\n\r\nI've isolated the problem to when this command it run but with strictmode on/off json/yaml/psd1. It doesn't make a difference.\r\n\r\nDo you know what this could be or how to solve it?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/gaelcolas/Datum/issues/comments/372505245","html_url":"https://github.com/gaelcolas/Datum/issues/39#issuecomment-372505245","issue_url":"https://api.github.com/repos/gaelcolas/Datum/issues/39","id":372505245,"user":{"login":"gaelcolas","id":8962101,"avatar_url":"https://avatars3.githubusercontent.com/u/8962101?v=4","gravatar_id":"","url":"https://api.github.com/users/gaelcolas","html_url":"https://github.com/gaelcolas","followers_url":"https://api.github.com/users/gaelcolas/followers","following_url":"https://api.github.com/users/gaelcolas/following{/other_user}","gists_url":"https://api.github.com/users/gaelcolas/gists{/gist_id}","starred_url":"https://api.github.com/users/gaelcolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaelcolas/subscriptions","organizations_url":"https://api.github.com/users/gaelcolas/orgs","repos_url":"https://api.github.com/users/gaelcolas/repos","events_url":"https://api.github.com/users/gaelcolas/events{/privacy}","received_events_url":"https://api.github.com/users/gaelcolas/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T00:21:38Z","updated_at":"2018-03-13T00:21:38Z","author_association":"OWNER","body":"Yep, it had to same type (I.e. array of 1). I had it differently before,\nbut it would create problems and inconsistencies in multilayer merges of\nsome types, do I took a more strict approach.\n\nIirc, one issue is when you have a single hashtable to merge with an array\nof hashtable... The first type had different type of merges (hash, deep) to\nthe second (tuple).\n\nAnother point is that it'd make reading the policy (data) much harder, as\nyou wouldn't know what it should end up looking.\n\nOn 12 Mar 2018 23:43, \"Ryan Bartram\" <notifications@github.com> wrote:\n\n> I did find some examples and the tuples so work well for merging multiple\n> array. I'll take a look and see what I can find out. Problem is that there\n> is a if that query if both types are arrays or not. I'll keep you posted\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/gaelcolas/Datum/issues/39#issuecomment-372498806>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AIjANXjGDg3c9gB17N5EKzEl16KfQpbEks5tdwgdgaJpZM4Sh9OK>\n> .\n>\n"}}
{"actor":{"display_login":"gaelcolas"}}