44 Commits

Author SHA1 Message Date
Jonas Platte
f818b53ca1
Make conversions from Ruma types to http types generic
So users can select the Body type that makes the most sense for them.
2021-04-23 13:26:10 +02:00
Jonas Platte
2923f1066e
serde: Add test for issue 446 2021-04-07 18:42:18 +02:00
Jonas Platte
5de8d3be5d
serde: Rewrite some tests to use assert_matches 2021-04-07 18:35:04 +02:00
Kévin Commaille
963400979b
docs: Harmonize ruma modules descriptions 2021-04-07 12:14:49 +02:00
Jonas Platte
466b8679d6
Replace all uses of ruma_serde::empty::Empty
… and remove it from the public API.
2021-04-05 18:57:42 +02:00
Jonas Platte
2805dd733b
serde: Improve error handling in time modules 2021-04-05 17:27:13 +02:00
Jonas Platte
1bf4157a89
Add favicon and logo URLs for rustdoc 2021-04-05 11:42:07 +02:00
Jonas Platte
dbe470ed54
serde: Don't error when deserializing IgnoredAny from a list 2021-03-23 20:55:22 +01:00
Jonas Platte
a20c75d536
Fix import grouping issues 2021-02-25 20:55:19 +01:00
Jonas Platte
5b004d5ed7
Don't import serde_json::Map 2021-02-11 19:00:57 +01:00
Jonas Platte
d8c5c326e6
serde: Simplify Deserializer implementation for ValOrVec 2021-02-03 19:27:21 +01:00
Jonas Platte
00121bdb4b
Fix inconsistent #[test] module naming 2021-02-02 11:44:30 +01:00
Jonas Platte
2705b27df1
Remove useless questionmark + Ok
Thanks, clippy!
2021-01-19 11:46:40 +01:00
Jonas Platte
25d283fa81
serde: Small code style change 2020-12-24 02:49:55 +01:00
Jonas Platte
e8b1e35714
serde: Optimize btreemap_int_or_string_to_int_values
Don't allocate a temporary `BTreeMap<T, IntWrap>`.
2020-12-12 17:57:51 +01:00
Jonas Platte
22ab60128a
serde: Fix int_or_string_to_int deserialization helper
It's unclear why the previous method didn't work, but this one definitely does.
2020-12-12 17:45:16 +01:00
Devin Ragotzy
724a48d616
Add examples to the docs of Raw and the ruma-events module 2020-12-07 17:57:23 +01:00
Jonas Platte
51ddcca9f5
Fix a typo 2020-12-03 22:28:23 +01:00
Jonas Platte
5562a23aaa
Move Raw, Outgoing and all macro code from ruma-common to ruma-serde 2020-11-28 03:45:39 +01:00
Jonas Platte
ea778a0fdc
serde: Move string-related helpers into a new module 2020-11-28 02:01:12 +01:00
Jonas Platte
e7f55ea2c6
Rewrap comments 2020-11-27 18:22:18 +01:00
Jonas Platte
abc18fae39
Fix some links in documentation 2020-11-24 03:25:02 +01:00
Alejandro Domínguez
51573238a9 Add function to deserialize BTreeMap with values of numbers and strings to integers 2020-11-20 14:31:10 +01:00
Alejandro Domínguez
0ac2f401f8 Add function to deserialize numbers and strings as an integer 2020-11-20 14:31:10 +01:00
Devin Ragotzy
bc43e94d7e
Add helper methods for CanonicalJsonObject construction 2020-10-29 19:31:23 +01:00
Jonas Platte
f2a78babbd
Avoid creating owned strings in deserialization where not necessary 2020-10-26 01:52:51 +01:00
Jonas Platte
3b3ef1cb75
Remove test_ prefix from lots of test functions 2020-10-25 23:11:08 +01:00
Jonas Platte
e1975c2035
Be more consistent about whitespace 2020-10-24 00:44:01 +02:00
Jonas Platte
16dd20d64e
Improve docs for impl Display for CanonicalJsonValue
and extract the doctest into a regular test.
2020-10-19 17:56:30 +02:00
Jonas Platte
4b81beaf05
Remove unnecessary lifetimes 2020-10-11 14:25:43 +02:00
Jonas Platte
98982be7fb
Add Default implementation for CanonicalJsonValue 2020-10-04 22:46:48 +02:00
Jonas Platte
e795c7fcd6
Add free function to_canonical_json_string
and move the canonical JSON error type from the canonical_json::value
module to canonical_json.
2020-10-04 22:46:24 +02:00
Devin Ragotzy
92f1fb463a
Create CanonicalJsonValue in ruma-serde 2020-09-28 11:17:46 +02:00
Julian Tescher
26ae56d168
push-gateway-api: Add notify API (#260)
Co-authored-by: Devin Ragotzy <devin.ragotzy@gmail.com>
2020-09-12 23:15:24 +02:00
Julian Tescher
ebd1387bac
federation-api: Add retrieval endpoints 2020-09-11 19:12:48 +02:00
Jonas Platte
bfe4e9fa27
Add ruma_serde::is_empty
This will be used for serde attributes that are copied to incoming types
and thus actually have to function for multiple types.
2020-08-28 22:53:40 +02:00
Jonas Platte
3428cabdca
Resolve TODO 2020-08-18 00:03:24 +02:00
Florian Jacob
a719174592
serde: Repair minor docs typo 2020-08-13 18:08:18 +02:00
Jonas Platte
1fbf05d71f
Fix some bad formatting 2020-08-08 21:52:58 +02:00
Jonas Platte
85e2ae3d48
Remove ugly commas 2020-07-24 21:13:41 +02:00
Jonas Platte
286b210779
ruma-serde: Use the new form_urlencoded crate instead of url 2020-06-20 00:30:01 +02:00
Jonas Platte
e42223b1e4
Remove support for serializing floats
This removes ruma-serde's dependency on dtoa. Removing deserialization
support could be done later, but would actually make the code more
complex, so is left out for now.
2020-06-19 22:06:17 +02:00
Jonas Platte
8ddff0d108
Merge rustfmt settings, re-run cargo fmt 2020-06-05 02:01:09 +02:00
Jonas Platte
f8a25dabca Add 'ruma-serde/' from commit '851ffea6d20bef1c66f1c8e0ceb4d4a00c9804fc'
git-subtree-dir: ruma-serde
git-subtree-mainline: ec8f70f42a5a3e44e082de21b153d5ff2bece72d
git-subtree-split: 851ffea6d20bef1c66f1c8e0ceb4d4a00c9804fc
2020-06-05 01:27:53 +02:00