{"action":"created","issue":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3148","labels_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3148/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3148/comments","events_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3148/events","html_url":"https://github.com/Starcounter/Starcounter/issues/3148","id":120792705,"number":3148,"title":"ToJson() returns the namespaced json.","user":{"login":"ivarbergman","id":112064,"avatar_url":"https://avatars.githubusercontent.com/u/112064?v=3","gravatar_id":"","url":"https://api.github.com/users/ivarbergman","html_url":"https://github.com/ivarbergman","followers_url":"https://api.github.com/users/ivarbergman/followers","following_url":"https://api.github.com/users/ivarbergman/following{/other_user}","gists_url":"https://api.github.com/users/ivarbergman/gists{/gist_id}","starred_url":"https://api.github.com/users/ivarbergman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivarbergman/subscriptions","organizations_url":"https://api.github.com/users/ivarbergman/orgs","repos_url":"https://api.github.com/users/ivarbergman/repos","events_url":"https://api.github.com/users/ivarbergman/events{/privacy}","received_events_url":"https://api.github.com/users/ivarbergman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/Puppets","name":"Puppets","color":"006b75"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/Typed%20JSON","name":"Typed JSON","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"chrhol","id":1658979,"avatar_url":"https://avatars.githubusercontent.com/u/1658979?v=3","gravatar_id":"","url":"https://api.github.com/users/chrhol","html_url":"https://github.com/chrhol","followers_url":"https://api.github.com/users/chrhol/followers","following_url":"https://api.github.com/users/chrhol/following{/other_user}","gists_url":"https://api.github.com/users/chrhol/gists{/gist_id}","starred_url":"https://api.github.com/users/chrhol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrhol/subscriptions","organizations_url":"https://api.github.com/users/chrhol/orgs","repos_url":"https://api.github.com/users/chrhol/repos","events_url":"https://api.github.com/users/chrhol/events{/privacy}","received_events_url":"https://api.github.com/users/chrhol/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-12-07T15:03:09Z","updated_at":"2015-12-07T16:53:53Z","closed_at":null,"body":"Hi! \r\n\r\nWhen I use the `ToJson()` method to serialise a view model I get the merged json as string (namespaced by `AppName`). \r\n\r\nI would expect the `ToJson()` to only return the json specific for my application.\r\n\r\nI guess the `ToJson` and `PopulateFromJson` should be each others inverse operations. \r\nHowever:\r\n\r\n    myJson.PopulateFromJson( myJson.ToJson() )\r\n\r\nfails if  `myJson` contains a `AppName` namespace. \r\n\r\n    System.Exception: ScErrJsonPropertyNotFound (SCERR14003): The property is not defined in the template. Property=\"tunity_terminal\"\r\n\r\nwhere `tunity_terminal` is my `AppName`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/comments/162590628","html_url":"https://github.com/Starcounter/Starcounter/issues/3148#issuecomment-162590628","issue_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3148","id":162590628,"user":{"login":"chrhol","id":1658979,"avatar_url":"https://avatars.githubusercontent.com/u/1658979?v=3","gravatar_id":"","url":"https://api.github.com/users/chrhol","html_url":"https://github.com/chrhol","followers_url":"https://api.github.com/users/chrhol/followers","following_url":"https://api.github.com/users/chrhol/following{/other_user}","gists_url":"https://api.github.com/users/chrhol/gists{/gist_id}","starred_url":"https://api.github.com/users/chrhol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrhol/subscriptions","organizations_url":"https://api.github.com/users/chrhol/orgs","repos_url":"https://api.github.com/users/chrhol/repos","events_url":"https://api.github.com/users/chrhol/events{/privacy}","received_events_url":"https://api.github.com/users/chrhol/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T16:53:53Z","updated_at":"2015-12-07T16:53:53Z","body":"Thank you for reporting this. You are correct, the namespace should not be added in this case, and perhaps `PopulateFromJson` should handle namespaces as well. \r\n\r\nThis happens when a TypedJson instance that is part of a Puppet viewmodel (i.e. is connected to a session) is serialized and the session have namespacing enabled.\r\n\r\nI will take a look at it when I'm finished with my current assignment."}}