{"action":"created","issue":{"url":"https://api.github.com/repos/miloyip/rapidjson/issues/341","labels_url":"https://api.github.com/repos/miloyip/rapidjson/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/miloyip/rapidjson/issues/341/comments","events_url":"https://api.github.com/repos/miloyip/rapidjson/issues/341/events","html_url":"https://github.com/miloyip/rapidjson/issues/341","id":76172389,"number":341,"title":"No GetFloat?","user":{"login":"Phyks","id":3856586,"avatar_url":"https://avatars.githubusercontent.com/u/3856586?v=3","gravatar_id":"","url":"https://api.github.com/users/Phyks","html_url":"https://github.com/Phyks","followers_url":"https://api.github.com/users/Phyks/followers","following_url":"https://api.github.com/users/Phyks/following{/other_user}","gists_url":"https://api.github.com/users/Phyks/gists{/gist_id}","starred_url":"https://api.github.com/users/Phyks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phyks/subscriptions","organizations_url":"https://api.github.com/users/Phyks/orgs","repos_url":"https://api.github.com/users/Phyks/repos","events_url":"https://api.github.com/users/Phyks/events{/privacy}","received_events_url":"https://api.github.com/users/Phyks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-14T00:15:39Z","updated_at":"2015-05-15T11:57:26Z","closed_at":null,"body":"Hi,\r\n\r\nThere are several ways to retrieve an int from a rapidjson::Value, either 32 or 64 bits. But there is only one method to retrieve a floating point value, which is GetDouble.\r\n\r\nThere is no GetFloat, to retrieve a 32 bits floating value.\r\n\r\nIs it done on purpose? What about adding such a method?\r\n\r\nContext: I compile with `-Wnarrowing` as I should not do any implicit narrowing conversion, which might lose precision in the code I am working on (imposed coding guideline) and writing static_cast every time is a pain for readability."},"comment":{"url":"https://api.github.com/repos/miloyip/rapidjson/issues/comments/102379694","html_url":"https://github.com/miloyip/rapidjson/issues/341#issuecomment-102379694","issue_url":"https://api.github.com/repos/miloyip/rapidjson/issues/341","id":102379694,"user":{"login":"miloyip","id":1195774,"avatar_url":"https://avatars.githubusercontent.com/u/1195774?v=3","gravatar_id":"","url":"https://api.github.com/users/miloyip","html_url":"https://github.com/miloyip","followers_url":"https://api.github.com/users/miloyip/followers","following_url":"https://api.github.com/users/miloyip/following{/other_user}","gists_url":"https://api.github.com/users/miloyip/gists{/gist_id}","starred_url":"https://api.github.com/users/miloyip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miloyip/subscriptions","organizations_url":"https://api.github.com/users/miloyip/orgs","repos_url":"https://api.github.com/users/miloyip/repos","events_url":"https://api.github.com/users/miloyip/events{/privacy}","received_events_url":"https://api.github.com/users/miloyip/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T11:57:26Z","updated_at":"2015-05-15T11:57:26Z","body":"It is not difficult, just checking if the mantissa lower bits are all zero and exponent is within range.\r\nHowever, currently it is not permitted to `GetInt()` of a value if the actual type is `double` or `int64_t`.\r\nOnly `integer` to `double` is converted automatically with potential precision loss."}}