Test JSON marshalling.