{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/13","labels_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/13/comments","events_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/13/events","html_url":"https://github.com/JuliaLang/JLD.jl/pull/13","id":99850759,"number":13,"title":"readas, writeas, and translate for custom serialization & type-repair","user":{"login":"timholy","id":1525481,"avatar_url":"https://avatars.githubusercontent.com/u/1525481?v=3","gravatar_id":"","url":"https://api.github.com/users/timholy","html_url":"https://github.com/timholy","followers_url":"https://api.github.com/users/timholy/followers","following_url":"https://api.github.com/users/timholy/following{/other_user}","gists_url":"https://api.github.com/users/timholy/gists{/gist_id}","starred_url":"https://api.github.com/users/timholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timholy/subscriptions","organizations_url":"https://api.github.com/users/timholy/orgs","repos_url":"https://api.github.com/users/timholy/repos","events_url":"https://api.github.com/users/timholy/events{/privacy}","received_events_url":"https://api.github.com/users/timholy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-09T01:40:42Z","updated_at":"2015-08-10T19:40:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/JLD.jl/pulls/13","html_url":"https://github.com/JuliaLang/JLD.jl/pull/13","diff_url":"https://github.com/JuliaLang/JLD.jl/pull/13.diff","patch_url":"https://github.com/JuliaLang/JLD.jl/pull/13.patch"},"body":"This is a revival of https://github.com/timholy/HDF5.jl/pull/191. To fix types that have changed between writing and the current code, it uses the following strategy:\r\n1. The user defines a `MyOldType` that corresponds to the on-disk version\r\n2. The user specifies that one should read an object whose *string* type is `MyType` as `MyOldType`\r\n3. The user define a `readas` method to convert a `MyOldType` into `MyType`.\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/comments/129579428","html_url":"https://github.com/JuliaLang/JLD.jl/pull/13#issuecomment-129579428","issue_url":"https://api.github.com/repos/JuliaLang/JLD.jl/issues/13","id":129579428,"user":{"login":"simonster","id":470884,"avatar_url":"https://avatars.githubusercontent.com/u/470884?v=3","gravatar_id":"","url":"https://api.github.com/users/simonster","html_url":"https://github.com/simonster","followers_url":"https://api.github.com/users/simonster/followers","following_url":"https://api.github.com/users/simonster/following{/other_user}","gists_url":"https://api.github.com/users/simonster/gists{/gist_id}","starred_url":"https://api.github.com/users/simonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonster/subscriptions","organizations_url":"https://api.github.com/users/simonster/orgs","repos_url":"https://api.github.com/users/simonster/repos","events_url":"https://api.github.com/users/simonster/events{/privacy}","received_events_url":"https://api.github.com/users/simonster/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T19:40:35Z","updated_at":"2015-08-10T19:40:35Z","body":"This is basically the only thing on the JLD wishlist that I haven't yet implemented in JLD2. One very difficult issue is what happens if you attempt to define `readas` and `writeas` for a bitstype, and you have another bits type with fields of that type. I *think* this code this will just write that type as-is, which may be okay for now."}}