Allow lists to be serialized to JSON too.