Skip to content

Commit 4ad5fcb

Browse files
authored
Merge pull request #240 from matrix-org/rav/fix_json_encoded_docs
Fix refs to 'JSON-encoded string' in documentation
1 parent 54533e7 commit 4ad5fcb

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/attachment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl EncryptedAttachment {
7575
/// It needs encrypted data, stored in an `Uint8Array`, and a
7676
/// [media encryption
7777
/// information](https://docs.rs/matrix-sdk-crypto/latest/matrix_sdk_crypto/struct.MediaEncryptionInfo.html),
78-
/// as a JSON-encoded string.
78+
/// as a JSON-encoded object.
7979
///
8080
/// The media encryption information aren't stored as a string:
8181
/// they are parsed, validated and fully deserialized.
@@ -102,7 +102,7 @@ impl EncryptedAttachment {
102102
self.encrypted_data.clone()
103103
}
104104

105-
/// Return the media encryption info as a JSON-encoded string. The
105+
/// Return the media encryption info as a JSON-encoded object. The
106106
/// structure is fully valid.
107107
///
108108
/// If the media encryption info have been consumed already, it

src/requests.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct KeysUploadRequest {
4242
#[wasm_bindgen(readonly)]
4343
pub id: JsString,
4444

45-
/// A JSON-encoded string containing the rest of the payload: `device_keys`,
45+
/// A JSON-encoded object containing the rest of the payload: `device_keys`,
4646
/// `one_time_keys`, `fallback_keys`.
4747
///
4848
/// It represents the body of the HTTP request.
@@ -78,7 +78,7 @@ pub struct KeysQueryRequest {
7878
#[wasm_bindgen(readonly)]
7979
pub id: JsString,
8080

81-
/// A JSON-encoded string containing the rest of the payload: `timeout`,
81+
/// A JSON-encoded object containing the rest of the payload: `timeout`,
8282
/// `device_keys`, `token`.
8383
///
8484
/// It represents the body of the HTTP request.
@@ -115,7 +115,7 @@ pub struct KeysClaimRequest {
115115
#[wasm_bindgen(readonly)]
116116
pub id: JsString,
117117

118-
/// A JSON-encoded string containing the rest of the payload: `timeout`,
118+
/// A JSON-encoded object containing the rest of the payload: `timeout`,
119119
/// `one_time_keys`.
120120
///
121121
/// It represents the body of the HTTP request.
@@ -163,7 +163,7 @@ pub struct ToDeviceRequest {
163163
#[wasm_bindgen(readonly)]
164164
pub txn_id: JsString,
165165

166-
/// A JSON-encoded string containing the rest of the payload: `messages`.
166+
/// A JSON-encoded object containing the rest of the payload: `messages`.
167167
///
168168
/// It represents the body of the HTTP request.
169169
#[wasm_bindgen(readonly)]
@@ -206,7 +206,7 @@ pub struct SignatureUploadRequest {
206206
#[wasm_bindgen(readonly)]
207207
pub id: Option<JsString>,
208208

209-
/// A JSON-encoded string containing the payload of the request
209+
/// A JSON-encoded object containing the payload of the request
210210
///
211211
/// It represents the body of the HTTP request.
212212
#[wasm_bindgen(readonly, js_name = "body")]
@@ -255,7 +255,7 @@ pub struct RoomMessageRequest {
255255
#[wasm_bindgen(readonly)]
256256
pub event_type: JsString,
257257

258-
/// A JSON-encoded string containing the message's content.
258+
/// A JSON-encoded object containing the message's content.
259259
#[wasm_bindgen(readonly, js_name = "body")]
260260
pub content: JsString,
261261
}
@@ -292,7 +292,7 @@ pub struct KeysBackupRequest {
292292
#[wasm_bindgen(readonly)]
293293
pub id: JsString,
294294

295-
/// A JSON-encoded string containing the rest of the payload: `rooms`.
295+
/// A JSON-encoded object containing the rest of the payload: `rooms`.
296296
///
297297
/// It represents the body of the HTTP request.
298298
#[wasm_bindgen(readonly)]
@@ -552,7 +552,7 @@ pub enum RequestType {
552552
#[wasm_bindgen(getter_with_clone)]
553553
#[derive(Debug, Clone)]
554554
pub struct UploadSigningKeysRequest {
555-
/// A JSON-encoded string containing the rest of the payload: `master_key`,
555+
/// A JSON-encoded object containing the rest of the payload: `master_key`,
556556
/// `self_signing_key`, `user_signing_key`.
557557
///
558558
/// It represents the body of the HTTP request.
@@ -600,7 +600,7 @@ impl TryFrom<&OriginalUploadSigningKeysRequest> for UploadSigningKeysRequest {
600600
#[derive(Debug)]
601601
/// A request that will upload a dehydrated device to the server.
602602
pub struct PutDehydratedDeviceRequest {
603-
/// A JSON-encoded string containing the rest of the payload: `rooms`.
603+
/// A JSON-encoded object containing the rest of the payload: `rooms`.
604604
///
605605
/// It represents the body of the HTTP request.
606606
#[wasm_bindgen(readonly)]

0 commit comments

Comments
 (0)