Test that json encoding doesn't mutate