public byte[] GetCompressed() { JObject payload = new JObject(); payload[nameof(PayloadAction)] = PayloadAction.ToString(); payload[nameof(SynchronizationId)] = SynchronizationId; payload[nameof(CustomInfo)] = JObject.FromObject(CustomInfo); payload[nameof(Inserts)] = JArray.FromObject(Inserts); payload[nameof(Updates)] = JArray.FromObject(Updates); payload[nameof(Deletes)] = JArray.FromObject(Deletes); payload[nameof(Conflicts)] = JArray.FromObject(Conflicts); payload[nameof(PayloadAppliedIds)] = JObject.FromObject(PayloadHelper.GetAppliedIdsForPayload(AppliedIds)); string json = JsonConvert.SerializeObject(payload); byte[] compressed = Compress(json); return(compressed); }