{"action":"opened","issue":{"url":"https://api.github.com/repos/FluidTYPO3/vhs/issues/1486","repository_url":"https://api.github.com/repos/FluidTYPO3/vhs","labels_url":"https://api.github.com/repos/FluidTYPO3/vhs/issues/1486/labels{/name}","comments_url":"https://api.github.com/repos/FluidTYPO3/vhs/issues/1486/comments","events_url":"https://api.github.com/repos/FluidTYPO3/vhs/issues/1486/events","html_url":"https://github.com/FluidTYPO3/vhs/issues/1486","id":333188341,"node_id":"MDU6SXNzdWUzMzMxODgzNDE=","number":1486,"title":"v:format.json.encode converts \"false\" to \"{}\" on top level","user":{"login":"maechler","id":4113819,"node_id":"MDQ6VXNlcjQxMTM4MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/4113819?v=4","gravatar_id":"","url":"https://api.github.com/users/maechler","html_url":"https://github.com/maechler","followers_url":"https://api.github.com/users/maechler/followers","following_url":"https://api.github.com/users/maechler/following{/other_user}","gists_url":"https://api.github.com/users/maechler/gists{/gist_id}","starred_url":"https://api.github.com/users/maechler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maechler/subscriptions","organizations_url":"https://api.github.com/users/maechler/orgs","repos_url":"https://api.github.com/users/maechler/repos","events_url":"https://api.github.com/users/maechler/events{/privacy}","received_events_url":"https://api.github.com/users/maechler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-18T09:08:33Z","updated_at":"2018-06-18T09:08:33Z","closed_at":null,"author_association":"NONE","body":"The current implementation of `v:format.json.encode` converts the value `false` to `{}`, when used on top level. Although the JSON spec allows any value (object, array, true, false, null, numbers) to be on top level. (https://stackoverflow.com/questions/17220924/does-the-top-level-value-in-json-have-to-be-an-array-or-object)\r\n\r\n`{v:format.json.encode(value: falseVariable)} --> returns {}`\r\n`{v:format.json.encode(value: trueVariable)} --> returns true`\r\n\r\nThe reason is the following check `true === empty($value)`: \r\nhttps://github.com/FluidTYPO3/vhs/blob/ed6b9219f2f8fd0439fbffd0f72b26ee6159ab70/Classes/ViewHelpers/Format/Json/EncodeViewHelper.php#L100-L102"}}
{"actor":{"display_login":"maechler"}}