{"action":"created","issue":{"url":"https://api.github.com/repos/wbuchanan/StataJSON/issues/13","repository_url":"https://api.github.com/repos/wbuchanan/StataJSON","labels_url":"https://api.github.com/repos/wbuchanan/StataJSON/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/wbuchanan/StataJSON/issues/13/comments","events_url":"https://api.github.com/repos/wbuchanan/StataJSON/issues/13/events","html_url":"https://github.com/wbuchanan/StataJSON/issues/13","id":134013323,"number":13,"title":"Handling of date/time values","user":{"login":"wbuchanan","id":5542790,"avatar_url":"https://avatars.githubusercontent.com/u/5542790?v=3","gravatar_id":"","url":"https://api.github.com/users/wbuchanan","html_url":"https://github.com/wbuchanan","followers_url":"https://api.github.com/users/wbuchanan/followers","following_url":"https://api.github.com/users/wbuchanan/following{/other_user}","gists_url":"https://api.github.com/users/wbuchanan/gists{/gist_id}","starred_url":"https://api.github.com/users/wbuchanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbuchanan/subscriptions","organizations_url":"https://api.github.com/users/wbuchanan/orgs","repos_url":"https://api.github.com/users/wbuchanan/repos","events_url":"https://api.github.com/users/wbuchanan/events{/privacy}","received_events_url":"https://api.github.com/users/wbuchanan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wbuchanan/StataJSON/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"wbuchanan","id":5542790,"avatar_url":"https://avatars.githubusercontent.com/u/5542790?v=3","gravatar_id":"","url":"https://api.github.com/users/wbuchanan","html_url":"https://github.com/wbuchanan","followers_url":"https://api.github.com/users/wbuchanan/followers","following_url":"https://api.github.com/users/wbuchanan/following{/other_user}","gists_url":"https://api.github.com/users/wbuchanan/gists{/gist_id}","starred_url":"https://api.github.com/users/wbuchanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbuchanan/subscriptions","organizations_url":"https://api.github.com/users/wbuchanan/orgs","repos_url":"https://api.github.com/users/wbuchanan/repos","events_url":"https://api.github.com/users/wbuchanan/events{/privacy}","received_events_url":"https://api.github.com/users/wbuchanan/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-16T15:37:16Z","updated_at":"2016-02-16T20:34:31Z","closed_at":null,"body":"jsonio command is not handling datetime types in a good way:\r\n\r\n```\r\n. webuse irates4, clear\r\n(St. Louis Fed (FRED) financial data)\r\n\r\n. jsonio in 1/2, w(all)\r\n{\r\n  \"data\" : [ {\r\n    \"date\" : 770.0,\r\n    \"sp500\" : 2.521008884397957,\r\n    \"t\" : 1.0,\r\n    \"tbill\" : 2.92,\r\n    \"bond\" : 4.42\r\n  }, {\r\n    \"date\" : 777.0,\r\n    \"sp500\" : 2.2208934130985165,\r\n    \"t\" : 2.0,\r\n    \"tbill\" : 3.0,\r\n    \"bond\" : 4.43\r\n  } ],\r\n  \"firstObservationId\" : 1,\r\n  \"lastObservationId\" : 2,\r\n  \"numberRecords\" : 2,\r\n  \"variableIndices\" : [ 1, 2, 3, 4, 5 ],\r\n  \"numberVariables\" : 5,\r\n  \"variableTypeIsString\" : {\r\n    \"date\" : false,\r\n    \"sp500\" : false,\r\n    \"t\" : false,\r\n    \"tbill\" : false,\r\n    \"bond\" : false\r\n  },\r\n  \"variableNames\" : [ \"t\", \"tbill\", \"date\", \"bond\", \"sp500\" ],\r\n  \"variableLabels\" : {\r\n    \"date\" : \"Date\",\r\n    \"sp500\" : \"S&P 500 return\",\r\n    \"t\" : \"Sequential time: weeks since 09feb1962\",\r\n    \"tbill\" : \"6-Month Treasury bill: secondary market rate\",\r\n    \"bond\" : \"Moody's seasoned AAA Corporate bond yield\"\r\n  },\r\n  \"valueLabelNames\" : { },\r\n  \"valueLabels\" : { },\r\n  \"observationIndex\" : [ 1, 2 ]\r\n}\r\n```\r\n\r\nIt'd be better to get the formatted string values for the dates and/or create Java date values to substitute in place of the SIF dates."},"comment":{"url":"https://api.github.com/repos/wbuchanan/StataJSON/issues/comments/184864926","html_url":"https://github.com/wbuchanan/StataJSON/issues/13#issuecomment-184864926","issue_url":"https://api.github.com/repos/wbuchanan/StataJSON/issues/13","id":184864926,"user":{"login":"wbuchanan","id":5542790,"avatar_url":"https://avatars.githubusercontent.com/u/5542790?v=3","gravatar_id":"","url":"https://api.github.com/users/wbuchanan","html_url":"https://github.com/wbuchanan","followers_url":"https://api.github.com/users/wbuchanan/followers","following_url":"https://api.github.com/users/wbuchanan/following{/other_user}","gists_url":"https://api.github.com/users/wbuchanan/gists{/gist_id}","starred_url":"https://api.github.com/users/wbuchanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbuchanan/subscriptions","organizations_url":"https://api.github.com/users/wbuchanan/orgs","repos_url":"https://api.github.com/users/wbuchanan/repos","events_url":"https://api.github.com/users/wbuchanan/events{/privacy}","received_events_url":"https://api.github.com/users/wbuchanan/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T20:34:31Z","updated_at":"2016-02-16T20:34:31Z","body":"Patched the date/time bug (as best as understood) : \r\n\r\n```\r\n. run jsonio.ado\r\n. webuse irates4, clear\r\n(St. Louis Fed (FRED) financial data)\r\n\r\n. jsonio in 1/3, what(all)\r\n{\r\n  \"data\" : {\r\n    \"source\" : \"http://www.stata-press.com/data/r14/irates4.dta\",\r\n    \"values\" : [ {\r\n      \"date\" : \"1962/02/09\",\r\n      \"sp500\" : 2.521008884397957,\r\n      \"t\" : 1.0,\r\n      \"tbill\" : 2.92,\r\n      \"bond\" : 4.42\r\n    }, {\r\n      \"date\" : \"1962/02/16\",\r\n      \"sp500\" : 2.2208934130985165,\r\n      \"t\" : 2.0,\r\n      \"tbill\" : 3.0,\r\n      \"bond\" : 4.43\r\n    }, {\r\n      \"date\" : \"1962/02/23\",\r\n      \"sp500\" : 1.4243309536188289,\r\n      \"t\" : 3.0,\r\n      \"tbill\" : 2.93,\r\n      \"bond\" : 4.42\r\n    } ]\r\n  },\r\n  \"first record id\" : 1,\r\n  \"last record id\" : 3,\r\n  \"number of records\" : 3,\r\n  \"variable indices\" : [ 1, 2, 3, 4, 5 ],\r\n  \"number of variables\" : 5,\r\n  \"variable type string\" : {\r\n    \"date\" : false,\r\n    \"sp500\" : false,\r\n    \"t\" : false,\r\n    \"tbill\" : false,\r\n    \"bond\" : false\r\n  },\r\n  \"variable names\" : [ \"t\", \"tbill\", \"date\", \"bond\", \"sp500\" ],\r\n  \"variable labels\" : {\r\n    \"date\" : \"Date\",\r\n    \"sp500\" : \"S&P 500 return\",\r\n    \"t\" : \"Sequential time: weeks since 09feb1962\",\r\n    \"tbill\" : \"6-Month Treasury bill: secondary market rate\",\r\n    \"bond\" : \"Moody's seasoned AAA Corporate bond yield\"\r\n  },\r\n  \"value label names\" : { },\r\n  \"value labels\" : { }\r\n}\r\n```\r\n"}}