You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specifications/features.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1312,6 +1312,7 @@ The core SDK provides an API for wrapper SDKs to supply Ably with analytics info
1312
1312
1313
1313
-`(OOP1)` An `ObjectOperation` describes an operation to be applied to an object on a channel
1314
1314
-`(OOP2)``ObjectOperationAction` enum has the following values in order from zero: `MAP_CREATE`, `MAP_SET`, `MAP_REMOVE`, `COUNTER_CREATE`, `COUNTER_INC`, `OBJECT_DELETE`, `MAP_CLEAR`
1315
+
-`(OOP2a)` When decoding, an `action` that does not map to any of the wire-ordered members above must not cause decoding to fail. The client library must instead represent it as an unrecognised action, using whatever representation is idiomatic for the implementation (for example a distinct sentinel value or a nullable field). The client library must never encode or send such an unrecognised action, and must ignore (not apply) any `ObjectOperation` whose `action` is unrecognised
1315
1316
-`(OOP3)` The attributes available in an `ObjectOperation` are:
1316
1317
-`(OOP3a)``action``ObjectOperationAction` enum - defines the operation to be applied to the object
1317
1318
-`(OOP3b)``objectId` string - the object ID of the object on a channel to which the operation should be applied
@@ -1475,6 +1476,7 @@ The core SDK provides an API for wrapper SDKs to supply Ably with analytics info
1475
1476
1476
1477
-`(OMP1)` An `ObjectsMap` object represents a map of key-value pairs
1477
1478
-`(OMP2)``ObjectsMapSemantics` enum has the following values in order from zero: `LWW`
1479
+
-`(OMP2a)` When decoding, a `semantics` value that does not map to any of the wire-ordered members above must not cause decoding to fail. The client library must instead represent it as unrecognised semantics, using whatever representation is idiomatic for the implementation (for example a distinct sentinel value or a nullable field), and must never encode or send such an unrecognised value
1478
1480
-`(OMP3)` The attributes available in an `ObjectsMap` are:
1479
1481
-`(OMP3a)``semantics``ObjectsMapSemantics` enum - the conflict-resolution semantics used by the map object
1480
1482
-`(OMP3b)``entries``Dict<String, ObjectsMapEntry>` - the map entries, indexed by key
@@ -1510,19 +1512,21 @@ The core SDK provides an API for wrapper SDKs to supply Ably with analytics info
1510
1512
#### ObjectData
1511
1513
1512
1514
-`(OD1)` An `ObjectData` represents a value in an object on a channel
1513
-
-`(OD2)` The attributes available in an `ObjectData` are:
1515
+
-`(OD2)` The attributes available in an `ObjectData` are listed below. Of the value fields - `boolean`, `bytes`, `number`, `string` and `json` - at most one must be set at a time:
1514
1516
-`(OD2a)``objectId` string - a reference to another object
1515
1517
-`(OD2b)``encoding` string - may be set by the client library to indicate that value in `string` field have an encoding
1516
-
-`(OD2c)``boolean` boolean - a primitive boolean leaf value in the object graph. Only one of the value fields - `boolean`, `bytes`, `number` or `string` - must be set at a time
1517
-
-`(OD2d)``bytes` binary \| string - a primitive binary leaf value in the object graph. It is sent to and received from the server as a Base64-encoded string when using the JSON protocol. Only one of the value fields - `boolean`, `bytes`, `number` or `string` - must be set at a time
1518
-
-`(OD2e)``number` number - a primitive number leaf value in the object graph. Only one of the value fields - `boolean`, `bytes`, `number` or `string` - must be set at a time
1519
-
-`(OD2f)``string` string - a primitive string leaf value in the object graph. Only one of the value fields - `boolean`, `bytes`, `number` or `string` - must be set at a time
1518
+
-`(OD2c)``boolean` boolean - a primitive boolean leaf value in the object graph
1519
+
-`(OD2d)``bytes` binary \| string - a primitive binary leaf value in the object graph. It is sent to and received from the server as a Base64-encoded string when using the JSON protocol
1520
+
-`(OD2e)``number` number - a primitive number leaf value in the object graph
1521
+
-`(OD2f)``string` string - a primitive string leaf value in the object graph
1522
+
-`(OD2g)``json` JsonObject \| JsonArray - a primitive JSON leaf value (an object or array) in the object graph. It is sent to and received from the server as a JSON-encoded string when using the JSON protocol
1520
1523
-`(OD3)` The size of the `ObjectData` is calculated as follows:
1521
-
-`(OD3a)` The size is the sum of the sizes of the `boolean`, `bytes`, `number`, and `string` properties
1524
+
-`(OD3a)` The size is the sum of the sizes of the `boolean`, `bytes`, `number`, `string`, and `json` properties
1522
1525
-`(OD3b)` If set, the size of a `boolean` property is 1
1523
1526
-`(OD3c)` If set, the size of a `bytes` property is its size in bytes (of the actual binary, not the base64 representation, regardless of whether the binary protocol is in use)
1524
1527
-`(OD3d)` If set, the size of a `number` property is 8
1525
1528
-`(OD3e)` If set, the size of a `string` property is its length
1529
+
-`(OD3g)` If set, the size of a `json` property is the byte length of its JSON-encoded string representation
1526
1530
-`(OD3f)` The size of a `null` or omitted property is zero
1527
1531
-`(OD4)``ObjectData` encoding:
1528
1532
-`(OD4a)` Payloads must be booleans, binary, numbers, strings, or JSON-encodable objects or arrays. Any other data type must not be permitted and result in an error with code 40013
@@ -2629,6 +2633,7 @@ Each type, method, and attribute is labelled with the name of one or more clause
0 commit comments