{"action":"created","issue":{"url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/157","labels_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/157/comments","events_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/157/events","html_url":"https://github.com/jacobwilliams/json-fortran/issues/157","id":113668459,"number":157,"title":"Bug reading scientific notation","user":{"login":"dwsideriusNIST","id":5341350,"avatar_url":"https://avatars.githubusercontent.com/u/5341350?v=3","gravatar_id":"","url":"https://api.github.com/users/dwsideriusNIST","html_url":"https://github.com/dwsideriusNIST","followers_url":"https://api.github.com/users/dwsideriusNIST/followers","following_url":"https://api.github.com/users/dwsideriusNIST/following{/other_user}","gists_url":"https://api.github.com/users/dwsideriusNIST/gists{/gist_id}","starred_url":"https://api.github.com/users/dwsideriusNIST/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwsideriusNIST/subscriptions","organizations_url":"https://api.github.com/users/dwsideriusNIST/orgs","repos_url":"https://api.github.com/users/dwsideriusNIST/repos","events_url":"https://api.github.com/users/dwsideriusNIST/events{/privacy}","received_events_url":"https://api.github.com/users/dwsideriusNIST/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jacobwilliams/json-fortran/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"jacobwilliams","id":6483379,"avatar_url":"https://avatars.githubusercontent.com/u/6483379?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobwilliams","html_url":"https://github.com/jacobwilliams","followers_url":"https://api.github.com/users/jacobwilliams/followers","following_url":"https://api.github.com/users/jacobwilliams/following{/other_user}","gists_url":"https://api.github.com/users/jacobwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobwilliams/subscriptions","organizations_url":"https://api.github.com/users/jacobwilliams/orgs","repos_url":"https://api.github.com/users/jacobwilliams/repos","events_url":"https://api.github.com/users/jacobwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/jacobwilliams/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-10-27T19:50:47Z","updated_at":"2015-10-28T02:11:06Z","closed_at":"2015-10-28T02:09:50Z","body":"Currently, json-fortran incorrectly reads certain real numbers given in scientific notation.\r\n\r\nFor example, given this input JSON file:\r\n```json\r\n{\r\n\t  \"real1\" : 1.000000E-05,\r\n\t  \"real2\" : 1.E-5,\r\n\t  \"real3\" : 1E-5\r\n}\r\n```\r\nand this fortran program:\r\n```fortran\r\nprogram test_JSON\r\nUSE json_module\r\nIMPLICIT NONE\r\nCHARACTER(100) :: argv\r\nLOGICAL :: input_JSON, found\r\nINTEGER :: istat, intno\r\nREAL :: realno\r\ntype(json_file) :: json\r\ncall get_command_argument(1,argv,istat)\r\ncall json%load_file(filename = argv)\r\nIF (json_failed()) THEN\r\n   WRITE(*,'(A)') 'ERROR: FAILED WHILE LOADING JSON FILE: '//TRIM(argv)\r\n   STOP\r\nELSE\r\n   WRITE(*,'(A)') 'SUCCESSFULLY OPENED JSON FILE: '//TRIM(argv)\r\n   call json%get('real1', realno, found)\r\n   write(*,*) realno\r\n   call json%get('real2', realno, found)\r\n   write(*,*) realno\r\n   call json%get('real3', realno, found)\r\n   write(*,*) realno\r\nENDIF\r\nend program test_JSON\r\n```\r\nthe output is:\r\n\r\n  1.000000000000000E-005\r\n  1.000000000000000E-005\r\n  9.999999999999999E-022\r\n\r\nNote: the \"real3\" value is \"1e-5\", but is read as 1e-22 (effectively zero). The other two versions of \"0.00001\" are read correctly.\r\n\r\nI submit this as an issue because Python, with the standard json package, will output real numbers as 1e-5 rather than 1.0e-5.\r\n\r\nCan json-fortran be fixed to read this type of real number correctly?"},"comment":{"url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/comments/151700304","html_url":"https://github.com/jacobwilliams/json-fortran/issues/157#issuecomment-151700304","issue_url":"https://api.github.com/repos/jacobwilliams/json-fortran/issues/157","id":151700304,"user":{"login":"jacobwilliams","id":6483379,"avatar_url":"https://avatars.githubusercontent.com/u/6483379?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobwilliams","html_url":"https://github.com/jacobwilliams","followers_url":"https://api.github.com/users/jacobwilliams/followers","following_url":"https://api.github.com/users/jacobwilliams/following{/other_user}","gists_url":"https://api.github.com/users/jacobwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobwilliams/subscriptions","organizations_url":"https://api.github.com/users/jacobwilliams/orgs","repos_url":"https://api.github.com/users/jacobwilliams/repos","events_url":"https://api.github.com/users/jacobwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/jacobwilliams/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T02:11:06Z","updated_at":"2015-10-28T02:11:06Z","body":"I committed the fix. I'll do a new release version soon. Thanks for the bug report!"}}