Add in a test for that fromJSON/toJSON bug