Skip to content

No public way to encode records as CloudKit Web Services JSON #495

Open

Description

@leogdion

MistKit encodes field values and record operations internally (Components.Schemas.FieldValueRequest, RecordOperation), but callers that need the wire format (copying records as JSON, showing a modifyRecords body) have to reimplement it: {"value", "type"}, *_LIST types, timestamps in milliseconds, base64 bytes, reference and location dictionaries.

Proposal: public encode/decode for FieldValue and RecordOperation, and a modify request body encoder, including clearing a field ({"value": null}) and a reference's zone. Add round-trip tests.

Found while building brightdigit/Mistico (vendored at Packages/MistKit, branch mistico from v1.0.0-beta.6). Tracked in brightdigit/Mistico#119.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions