JsonSerialisable type class -- some more io mucking around. I think the conclusion I've come to is that it doesn't like record types