Handle json serialization of repeated fields correctly.