Skip to content

[pull] master from serde-rs:master #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 687 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
687 commits
Select commit Hold shift + click to select a range
b9bcbad
Use BuildHasher::hash_one
dtolnay Dec 28, 2023
b328ee7
Eliminate hash closure in favor of calling hash_one directly
dtolnay Dec 28, 2023
c367091
Merge pull request #1095 from dtolnay/hashtest
dtolnay Dec 28, 2023
df36d10
Restore doc cfg on re-exports
dtolnay Jan 1, 2024
bb62c73
Merge pull request #1097 from serde-rs/doccfg
dtolnay Jan 1, 2024
f88bf1f
Release 1.0.109
dtolnay Jan 1, 2024
c35856a
Pull in proc-macro2 sccache fix
dtolnay Jan 2, 2024
df5cf21
Release 1.0.110
dtolnay Jan 2, 2024
c80dbaf
Set limb width to 64 for loongarch64
heiher Jan 4, 2024
96ecfad
Merge pull request #1100 from heiher/limb-64-la64
dtolnay Jan 4, 2024
0131ac6
Release 1.0.111
dtolnay Jan 4, 2024
6d44b9f
Ignore unconditional_recursion clippy lint due to false positive
dtolnay Jan 12, 2024
2909b0b
fix: Correct spelling error
keienWang Jan 26, 2024
e56cc69
Merge pull request #1105 from keienWang/master
dtolnay Jan 26, 2024
296fafb
Factor out JSON-specific Display impl for serde::de::Unexpected
dtolnay Jan 26, 2024
62ca3e4
Handle Unexpected::Unit in Error::invalid_value
dtolnay Jan 26, 2024
107c2d1
Merge pull request #1106 from serde-rs/invalidvalue
dtolnay Jan 26, 2024
83d7bad
Format f64 in error messages using ryu
dtolnay Jan 26, 2024
6a6d2bb
Merge pull request #1107 from serde-rs/unexpectedfloat
dtolnay Jan 26, 2024
7fece96
Release 1.0.112
dtolnay Jan 26, 2024
ca3c2ca
Add swap_remove and shift_remove methods on Map
dtolnay Jan 29, 2024
5aeab4e
Merge pull request #1109 from serde-rs/remove
dtolnay Jan 29, 2024
09d865b
Release 1.0.113
dtolnay Jan 29, 2024
ca05f69
Remove unused Float::is_sign_negative trait method
dtolnay Feb 8, 2024
34a04c5
Ignore incompatible_msrv clippy false positives in test
dtolnay Feb 10, 2024
6fb7026
Work around prelude redundant import warnings
dtolnay Feb 19, 2024
e1b3a6d
Release 1.0.114
dtolnay Feb 20, 2024
fedf834
Ignore non_local_definitions false positive in test
dtolnay Feb 26, 2024
a25f6c6
Remove conditional on repr(transparent)
dtolnay Mar 22, 2024
8e7b37b
Merge pull request #1118 from serde-rs/transparent
dtolnay Mar 22, 2024
d2dbbf7
Ignore dead code lint in tests
dtolnay Mar 24, 2024
4a0be88
Format regression tests with rustfmt
dtolnay Mar 24, 2024
3a3f61b
Temporarily disable miri on doctests
dtolnay Mar 25, 2024
840da8e
Fix missing backticks in doc comments
titaniumtraveler Mar 25, 2024
218770b
Explicitly install a Rust toolchain for cargo-outdated job
dtolnay Mar 26, 2024
c3dc153
Merge pull request #1119 from titaniumtraveler/pr
dtolnay Mar 26, 2024
b1ebf38
Release 1.0.115
dtolnay Mar 26, 2024
0baba28
Resolve legacy_numeric_constants clippy lints
dtolnay Apr 6, 2024
2e15e3d
Revert "Temporarily disable miri on doctests"
dtolnay Apr 8, 2024
25dc750
Replace `features_check` mod with a call to `std::compile_error!`. F…
mleonhard Apr 15, 2024
051ce97
Merge pull request 1124 from mleonhard/master
dtolnay Apr 16, 2024
12c8ee0
Hide "non-exhaustive patterns" errors when crate fails to compile
dtolnay Apr 16, 2024
a3f62bb
Release 1.0.116
dtolnay Apr 16, 2024
16eb872
impl `Hash` for `Value`
edwardycl Apr 25, 2024
98f1a24
Resolve unexpected_cfgs warning
dtolnay May 7, 2024
b4fc245
Merge pull request #1130 from serde-rs/checkcfg
dtolnay May 7, 2024
fdf99c7
Combine number PartialEq tests
dtolnay May 7, 2024
4517c7a
PartialEq is not implemented between Value and 128-bit ints
dtolnay May 8, 2024
0ae247c
Release 1.0.117
dtolnay May 8, 2024
aaee69e
Implement Deserializer for Map<String, Value> and &Map<String, Value>
swlynch99 May 14, 2024
5e83bf7
Clean up visit_object and visit_object_ref
swlynch99 May 14, 2024
c2540b0
Clean up deserialize_enum methods on Value and &Value
swlynch99 May 14, 2024
8e475f1
Rely on docs.rs to define --cfg=docsrs by default
dtolnay May 19, 2024
62839b7
Merge pull request #1136 from dtolnay/docsrs
dtolnay May 19, 2024
18e9b89
Resolve needless_raw_string_hashes pedantic clippy lint in test
dtolnay Jun 2, 2024
b83d243
Ignore large_digit_groups pedantic clippy lint in test
dtolnay Jun 2, 2024
c9b9f88
Run more of test suite in preserve_order mode
dtolnay Jun 2, 2024
fa8aa22
Fill in ignore reasons in all #[ignore] attributes
dtolnay Jun 2, 2024
4c894ea
Delete unused associated constant from lexical
dtolnay Jun 8, 2024
24d868f
Another lexical const that is unused, though not in test
dtolnay Jun 8, 2024
168ef4b
Add i128 deserialization
druide Jun 17, 2024
4f12af0
Fix tests
druide Jun 17, 2024
eb0330a
Merge pull request #1127 from edwardycl/hash
dtolnay Jun 25, 2024
0af2bda
Resolve semicolon_if_nothing_returned pedantic clippy lint from PR 1127
dtolnay Jun 25, 2024
5e7bedc
Touch up PR 1127
dtolnay Jun 25, 2024
51d94eb
Combine Map's Hash into one impl
dtolnay Jun 25, 2024
c4f24f3
Release 1.0.118
dtolnay Jun 25, 2024
a83fe96
chore: remove repeat words
haouvw Jun 26, 2024
a9e089a
Merge pull request #1146 from haouvw/master
dtolnay Jun 26, 2024
309ef6b
Add Map::shift_insert()
joshka Jun 30, 2024
c17e63f
Merge pull request #1149 from joshka/master
dtolnay Jun 30, 2024
352b7ab
Document the cfg required for Map::shift_insert to exist
dtolnay Jun 30, 2024
8878cd7
Make shift_insert available for inlining like other Map methods
dtolnay Jun 30, 2024
b48b9a3
Release 1.0.119
dtolnay Jun 30, 2024
3480fed
fix: indexmap minimal version with Map::shift_insert()
cforycki Jul 1, 2024
962c0fb
Merge pull request #1152 from cforycki/fix/index-map-minimal-version
dtolnay Jul 1, 2024
bcedc3d
Release 1.0.120
dtolnay Jul 1, 2024
fcb5e83
Correct documentation URL for Value's Index impl.
dpathakj Jul 2, 2024
3fd6f5f
Merge pull request #1153 from dpathakj/master
dtolnay Jul 3, 2024
3f1c6de
Ignore byte_char_slices clippy lint in test
dtolnay Jul 12, 2024
6a306e6
Move call to tri! out of check_recursion!
purplesyringa Jul 26, 2024
40dd7f5
Merge pull request #1159 from iex-rs/fix-recursion
dtolnay Jul 26, 2024
b1edc7d
Optimize position search in error path
purplesyringa Jul 26, 2024
b0d678c
Merge pull request #1160 from iex-rs/efficient-position
dtolnay Jul 28, 2024
eca2658
Release 1.0.121
dtolnay Jul 28, 2024
3faae03
Vectorize string parsing
purplesyringa Jul 29, 2024
03ceee9
Replace ESCAPE array with is_escape fn
purplesyringa Jul 29, 2024
63cb04d
Bring MSRV down
purplesyringa Jul 29, 2024
3063d69
Add better tests
purplesyringa Jul 29, 2024
7633cb7
Eliminate local_inner_macros in favor of non-ident macro paths
dtolnay Aug 1, 2024
611b2a4
Merge pull request #1165 from serde-rs/jsonmac
dtolnay Aug 1, 2024
6827c7b
Fix json! invocations when std prelude is not in scope
dtolnay Aug 1, 2024
49d7d66
Merge pull request #1166 from dtolnay/allocvec
dtolnay Aug 1, 2024
16fb6e0
Work around buggy rust-analyzer behavior
dtolnay Aug 1, 2024
54381d6
Release 1.0.122
dtolnay Aug 1, 2024
5496579
Inline memchr2 logic into Mycroft's algorithm
purplesyringa Aug 11, 2024
a95d6df
Big endian support
purplesyringa Aug 11, 2024
1f0dcf7
Allow clippy::items_after_statements
purplesyringa Aug 11, 2024
8389d8a
Don't run the slow algorithm from the beginning
purplesyringa Aug 11, 2024
e43da5e
Immediately bail-out on empty strings
purplesyringa Aug 11, 2024
859ead8
Merge pull request #1161 from iex-rs/vectorized-string-parsing
dtolnay Aug 11, 2024
346189a
Fix needless_borrow clippy lint in new control character test
dtolnay Aug 11, 2024
2cab07e
Release 1.0.123
dtolnay Aug 11, 2024
8eba786
Fix skip_to_escape on BE architectures
purplesyringa Aug 11, 2024
8b314a7
Merge pull request #1173 from iex-rs/fix-big-endian
dtolnay Aug 11, 2024
cf771a0
Release 1.0.124
dtolnay Aug 11, 2024
81b1b61
Test on BE and 32-bit platforms on CI via Miri
purplesyringa Aug 11, 2024
86d0e11
Parse \uXXXX escapes faster
purplesyringa Aug 11, 2024
a38dbf3
Mark \u parsing as cold
purplesyringa Aug 12, 2024
0e90b61
Format UTF-8 strings manually
purplesyringa Aug 12, 2024
2f28d10
Use the same UTF-8/WTF-8 impl for surrogates
purplesyringa Aug 12, 2024
236cc82
Simplify unicode escape handling
purplesyringa Aug 12, 2024
96ae604
Correct WTF-8 parsing
purplesyringa Aug 12, 2024
8073fc1
Merge pull request #1174 from iex-rs/miri-on-ci
dtolnay Aug 12, 2024
94a2aad
Improve job names for miri jobs
dtolnay Aug 12, 2024
b4bc643
Merge pull request #1176 from dtolnay/miriname
dtolnay Aug 12, 2024
d8921cd
Merge pull request #1172 from iex-rs/faster-hex
dtolnay Aug 12, 2024
0f942e5
Merge pull request 1175 from iex-rs/faster-backslash-u
dtolnay Aug 15, 2024
cc7a160
Touch up PR 1175
dtolnay Aug 15, 2024
6130f9b
Release 1.0.125
dtolnay Aug 15, 2024
9ffb43a
Optimize Unicode decoding by 1%
purplesyringa Aug 19, 2024
50c4328
Merge pull request #1178 from iex-rs/tiny-bit-faster-hex
dtolnay Aug 19, 2024
0ceb9d8
Add `OccupiedEntry::remove_entry()` (and shift/swap versions)
GREsau Aug 19, 2024
11fc61c
Add `OccupiedEntry::shift_remove()` and `swap_remove()`
GREsau Aug 19, 2024
3d837e1
Ensure the SWAR chunks are 64-bit in more cases
CryZe Aug 23, 2024
fec0376
Merge pull request #1182 from CryZe/chunk-64bit
dtolnay Aug 23, 2024
f268173
Unify chunk size choice between float and string parsing
dtolnay Aug 23, 2024
4b1048d
Merge pull request #1183 from serde-rs/arithmetic
dtolnay Aug 23, 2024
ffc4a43
Improve cfg names for fast arithmetic
dtolnay Aug 23, 2024
e6282b0
Merge pull request #1184 from serde-rs/fastarithmetic
dtolnay Aug 23, 2024
ec980b0
Release 1.0.126
dtolnay Aug 23, 2024
f287a3b
Merge pull request 1179 from GREsau/patch-1
dtolnay Aug 23, 2024
5ebf65c
Release 1.0.127
dtolnay Aug 23, 2024
27a4ca9
Upload CI Cargo.lock for reproducing failures
dtolnay Aug 25, 2024
5416cee
feat: add support for 128 bit HashMap key serialization
Mrreadiness Sep 4, 2024
599228d
Merge pull request #1188 from Mrreadiness/feat/add-hashmap-key-128-se…
dtolnay Sep 4, 2024
d96b1d9
Release 1.0.128
dtolnay Sep 4, 2024
59112ae
Replace f64::to_string with ryu
dtolnay Sep 4, 2024
4921906
Replace integer to_string with itoa
dtolnay Sep 4, 2024
3f4e30a
Replace char::to_string with encode_utf8
dtolnay Sep 4, 2024
d254281
Replace str::to_string with to_owned
dtolnay Sep 4, 2024
1faf3a1
Replace bool::to_string with if
dtolnay Sep 4, 2024
309cfc9
Resolve empty_line_after_doc_comments clippy lint in lexical
dtolnay Sep 27, 2024
ef9ca27
Resolve some needless_lifetimes clippy lints
dtolnay Oct 7, 2024
faab2e8
Ignore needless_lifetimes clippy lint
dtolnay Oct 7, 2024
c1a06c1
Add methods on Map and Value to destroy preserved ordering
dtolnay Oct 17, 2024
2679e30
Merge pull request #1199 from dtolnay/sort
dtolnay Oct 17, 2024
fe499e8
Release 1.0.129
dtolnay Oct 17, 2024
8ceb824
Improve rendering of sort_keys documentation
dtolnay Oct 18, 2024
29f4a47
Merge pull request #1141 from druide/master
dtolnay Oct 18, 2024
5fab5fc
Format PR 1141 with rustfmt
dtolnay Oct 18, 2024
eb9ce29
Delete unreachable branch from Number::from_i128
dtolnay Oct 18, 2024
22973d2
Merge pull request #1200 from dtolnay/from128
dtolnay Oct 18, 2024
c3149ef
Flatten logic in Number::from_i128
dtolnay Oct 18, 2024
f699506
Allow arbitrarily large i128 in arbitrary_precision mode
dtolnay Oct 18, 2024
be67b7e
Merge pull request #1201 from dtolnay/from128
dtolnay Oct 18, 2024
e64c368
Delete #[inline] from some Number methods
dtolnay Oct 18, 2024
f3e2c48
Delete unneeded imports in doc code
dtolnay Oct 18, 2024
b4df0f8
Merge pull request #1202 from dtolnay/useprimitive
dtolnay Oct 18, 2024
fb12a9d
Update Number::from_i128 documentation regarding bounds
dtolnay Oct 18, 2024
1a944f4
Delete Value::as_i128
dtolnay Oct 18, 2024
95f55f3
Delete Number conversion example code
dtolnay Oct 18, 2024
be68eab
Return error instead of Null if i128 deserialized to Value is out of …
dtolnay Oct 18, 2024
7e45e3d
Merge pull request #1203 from dtolnay/i128err
dtolnay Oct 18, 2024
d86703f
Add Number u128 conversions
dtolnay Oct 18, 2024
2a2adb1
Merge pull request #1204 from dtolnay/u128
dtolnay Oct 18, 2024
2825e15
Release 1.0.130
dtolnay Oct 18, 2024
b4954a9
Merge pull request #1135 from swlynch99/map-deserializer
dtolnay Oct 18, 2024
0d084c5
Touch up PR 1135
dtolnay Oct 18, 2024
a810ba9
Release 1.0.131
dtolnay Oct 18, 2024
b71ccd2
Reduce duplicative instantiation of logic in SeqAccess and MapAccess
dtolnay Oct 19, 2024
4cb90ce
Merge pull request #1205 from dtolnay/hasnext
dtolnay Oct 19, 2024
2a4cb44
Rearrange 'match peek'
dtolnay Oct 19, 2024
0f54a1a
Handle early return sooner on eof in seq or map
dtolnay Oct 19, 2024
f2082d2
Clearer order of comparisons
dtolnay Oct 19, 2024
f45b422
Merge pull request #1206 from dtolnay/hasnext
dtolnay Oct 19, 2024
86d933c
Release 1.0.132
dtolnay Oct 19, 2024
42ab31f
Update ui test suite to nightly-2024-10-31
dtolnay Oct 31, 2024
7cce517
Raise minimum version for preserve_order feature to Rust 1.65
dtolnay Nov 5, 2024
be2198a
Prevent upload-artifact step from causing CI failure
dtolnay Nov 9, 2024
73011c0
Add a safety comment to unsafe block
djmitche Nov 14, 2024
75ed447
Merge pull request #1213 from djmitche/safety-comment
dtolnay Nov 15, 2024
07f280a
Wrap PR 1213 to 80 columns
dtolnay Nov 15, 2024
a11f5f2
Resolve unnecessary_map_or clippy lints
dtolnay Nov 16, 2024
2ccb5b6
Disable question_mark clippy lint in lexical test
dtolnay Nov 16, 2024
4e5f985
Implement From<[T; N]> for Value
dtolnay Nov 17, 2024
2b65ca0
Merge pull request #1215 from dtolnay/fromarray
dtolnay Nov 17, 2024
0903de4
Release 1.0.133
dtolnay Nov 17, 2024
9c9aa1f
Add literal 'null', 'true' and 'false' consts to `RawValue` struct.
bheylin Dec 11, 2024
4db66fb
Add `'static` lifetime to `const`'s
bheylin Dec 11, 2024
96576ba
Merge pull request #1221 from bheylin/add-const-raw-values-for-null-a…
dtolnay Dec 11, 2024
f42c7c7
Move RawValue associated constants into same impl block as public fun…
dtolnay Dec 11, 2024
4aa05b9
Merge pull request #1222 from dtolnay/rawvalueassoc
dtolnay Dec 11, 2024
9875785
Tweak wording of NULL/TRUE/FALSE documentation
dtolnay Dec 21, 2024
b2a1415
Release 1.0.134
dtolnay Dec 21, 2024
1e77cac
Resolve precedence clippy lint
dtolnay Dec 27, 2024
d48c224
Add Map::into_values method
tisonkun Jan 7, 2025
b97935f
Merge pull request #1226 from tisonkun/map-into-values
dtolnay Jan 7, 2025
9802c08
Release 1.0.135
dtolnay Jan 7, 2025
513e5b2
Use Map::with_capacity in value::Serializer::serialize_map
goffrie Jan 18, 2025
eb9f3f6
Merge pull request #1230 from goffrie/patch-1
dtolnay Jan 19, 2025
a46f14c
Release 1.0.136
dtolnay Jan 19, 2025
7d8f15b
Enable "float_roundtrip" and "unbounded_depth" features in playground
dtolnay Jan 19, 2025
51c48ab
Merge pull request #1231 from dtolnay/playground
dtolnay Jan 19, 2025
eb49e28
Release 1.0.137
dtolnay Jan 19, 2025
c7626db
Remove **/*.rs.bk from project-specific gitignore
dtolnay Jan 23, 2025
4134f11
Remove *.sw[po] from gitignore
dtolnay Jan 23, 2025
87f78da
More precise gitignore patterns
dtolnay Jan 23, 2025
65bbd1a
Fix example of from_reader not applying buffering when it should
JonathanBrouwer Jan 28, 2025
8c2d800
Add more warnings to apply buffering on docs of affected functions
JonathanBrouwer Jan 28, 2025
d33c1b5
Merge pull request #1237 from JonathanBrouwer/master
dtolnay Jan 28, 2025
29122f9
Sort imports from PR 1237
dtolnay Jan 28, 2025
dc29e48
Move BufReader to caller
dtolnay Jan 28, 2025
c916099
Release 1.0.138
dtolnay Jan 28, 2025
1174c5f
Resolve unnecessary_semicolon pedantic clippy lint
dtolnay Jan 30, 2025
1d7378e
Unset doc-scrape-examples for lib target
dtolnay Feb 10, 2025
13591f1
Convert html links to intra-doc links
dtolnay Feb 20, 2025
7a79781
Merge pull request #1241 from dtolnay/doclink
dtolnay Feb 20, 2025
e5bb8bd
Document behavior of write_f32/f64 on non-finite floats
dtolnay Feb 20, 2025
5d6b32f
Merge pull request #1242 from dtolnay/writefloat
dtolnay Feb 20, 2025
4d4f53c
Release 1.0.139
dtolnay Feb 20, 2025
400eaa9
Point standard library links to stable
dtolnay Feb 20, 2025
76cd4fb
Ignore elidable_lifetime_names pedantic clippy lint
dtolnay Mar 3, 2025
f7200c3
Ignore unbuffered_bytes clippy lint
dtolnay Mar 3, 2025
b34d317
Delete unused gcc installation
dtolnay Mar 3, 2025
d77a498
Merge pull request #1245 from serde-rs/powerpc
dtolnay Mar 3, 2025
7627834
Release 1.0.140
dtolnay Mar 3, 2025
af3d80d
chore: fix typo
jimmycathy Mar 16, 2025
8a56cfa
Merge pull request #1248 from jimmycathy/master
dtolnay Mar 16, 2025
c1826eb
Pin nightly toolchain used for miri job
dtolnay May 17, 2025
0c0e9f6
Add Clone and Debug impls to map iterators
xlambein May 31, 2025
cd55b5a
Ignore mismatched_lifetime_syntaxes lint
dtolnay Jun 6, 2025
9206cc0
feat: impl Default for &Value
aatifsyed Jun 18, 2025
bea0fe6
Implement Default for CompactFormatter
SOF3 Jul 6, 2025
fd35a02
Implement FromStr for Map<String, Value>
mickvangelderen Jul 10, 2025
f2d940d
replace start index with bytes slice reference
conradludgate Jul 18, 2025
de70b7d
use unreachable_unchecked for escape table. use a second match to rou…
conradludgate Jul 18, 2025
623d9b4
Merge pull request #1273 from conradludgate/optimise-string-escaping
dtolnay Jul 18, 2025
6e2c210
Touch up PR 1273
dtolnay Jul 18, 2025
6843c36
Release 1.0.141
dtolnay Jul 18, 2025
84abbdb
Merge pull request #1265 from aatifsyed/master
dtolnay Jul 31, 2025
e51c814
Touch up PR 1265
dtolnay Jul 31, 2025
1731167
Release 1.0.142
dtolnay Jul 31, 2025
ba5b3cc
Revert "Pin nightly toolchain used for miri job"
dtolnay Aug 8, 2025
8be6647
Merge pull request #1268 from SOF3/compact-default
dtolnay Aug 19, 2025
ec190d6
Merge pull request #1264 from xlambein/master
dtolnay Aug 19, 2025
447170b
Merge pull request 1271 from mickvangelderen/mick/impl-from-str-for-map
dtolnay Aug 19, 2025
2a5b853
Replace super::super with absolute path within crate
dtolnay Aug 19, 2025
10102c4
Release 1.0.143
dtolnay Aug 19, 2025
d12e943
Update actions/checkout@v4 -> v5
dtolnay Aug 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 101 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule: [cron: "40 1 * * *"]

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
test:
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
Expand All @@ -13,8 +20,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, windows]
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test
- run: cargo test --features preserve_order --tests -- --skip ui --exact
Expand All @@ -23,62 +31,126 @@ jobs:
- run: cargo test --features float_roundtrip,arbitrary_precision --tests -- --skip ui --exact
- run: cargo test --features raw_value --tests -- --skip ui --exact
- run: cargo test --features unbounded_depth --tests -- --skip ui --exact
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu' && always()
with:
name: Cargo.lock
path: Cargo.lock
continue-on-error: true

build:
name: Rust ${{matrix.rust}} ${{matrix.os == 'windows' && '(windows)' || ''}}
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [beta, stable, 1.45.0, 1.40.0, 1.36.0, 1.31.0]
rust: [beta, 1.65.0, 1.56.1]
os: [ubuntu]
include:
- rust: stable
os: ubuntu
target: aarch64-unknown-none
- rust: stable
os: windows
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo check
- run: cargo check --features preserve_order
if: matrix.rust != '1.31.0'
- run: cargo check --features float_roundtrip
- run: cargo check --features arbitrary_precision
- run: cargo check --features raw_value
- run: cargo check --features unbounded_depth
targets: ${{matrix.target}}
- run: cargo check --manifest-path tests/crate/Cargo.toml
- run: cargo check --manifest-path tests/crate/Cargo.toml --features float_roundtrip
- run: cargo check --manifest-path tests/crate/Cargo.toml --features arbitrary_precision
- run: cargo check --manifest-path tests/crate/Cargo.toml --features raw_value
- run: cargo check --manifest-path tests/crate/Cargo.toml --features unbounded_depth
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,arbitrary_precision
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value
- run: cargo check --manifest-path tests/crate/Cargo.toml --features serde_json/preserve_order
if: matrix.rust != '1.56.1'
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,serde_json/preserve_order
if: matrix.rust != '1.56.1'
- name: Build without std
run: |
rustup target add aarch64-unknown-none
cargo check \
--manifest-path tests/crate/Cargo.toml \
--target aarch64-unknown-none \
--no-default-features \
--features alloc
if: matrix.rust == 'stable' && matrix.os == 'ubuntu'
run: cargo check --manifest-path tests/crate/Cargo.toml --target ${{matrix.target}} --no-default-features --features alloc
if: matrix.target

nostd:
name: Rust 1.36.0
minimal:
name: Minimal versions
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: dtolnay/[email protected]
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,preserve_order
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
- run: cargo generate-lockfile -Z minimal-versions
- run: cargo check --locked

miri:
name: Miri (${{matrix.name}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: 64-bit little endian
target: x86_64-unknown-linux-gnu
- name: 64-bit big endian
target: powerpc64-unknown-linux-gnu
- name: 32-bit little endian
target: i686-unknown-linux-gnu
- name: 32-bit big endian
target: mips-unknown-linux-gnu
env:
MIRIFLAGS: -Zmiri-strict-provenance
timeout-minutes: 45
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@miri
- run: cargo miri setup
- run: cargo miri test --target ${{matrix.target}}
- run: cargo miri test --target ${{matrix.target}} --features preserve_order,float_roundtrip,arbitrary_precision,raw_value

clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@clippy
- run: cargo clippy
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
- run: cargo clippy --all-features --tests -- -Dclippy::all -Dclippy::pedantic

doc:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs

fuzz:
name: Fuzz
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-fuzz --debug
- run: cargo fuzz build -O
- uses: dtolnay/install@cargo-fuzz
- run: cargo fuzz check

outdated:
name: Outdated
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/install@cargo-outdated
- run: cargo outdated --exit-code 1
- run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
target/
**/*.rs.bk
*.sw[po]
Cargo.lock
/target/
/Cargo.lock
55 changes: 30 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,59 +1,64 @@
[package]
name = "serde_json"
version = "1.0.60" # remember to update html_root_url
version = "1.0.143"
authors = ["Erick Tryzelaar <[email protected]>", "David Tolnay <[email protected]>"]
license = "MIT OR Apache-2.0"
categories = ["encoding", "parser-implementations", "no-std"]
description = "A JSON serialization file format"
repository = "https://github.com/serde-rs/json"
documentation = "https://docs.serde.rs/serde_json/"
documentation = "https://docs.rs/serde_json"
edition = "2021"
keywords = ["json", "serde", "serialization"]
categories = ["encoding"]
readme = "README.md"
include = ["build.rs", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/serde-rs/json"
rust-version = "1.56"

[dependencies]
serde = { version = "1.0.100", default-features = false }
indexmap = { version = "1.5", optional = true }
itoa = { version = "0.4.3", default-features = false }
indexmap = { version = "2.2.3", optional = true }
itoa = "1.0"
memchr = { version = "2", default-features = false }
ryu = "1.0"
serde = { version = "1.0.194", default-features = false }

[dev-dependencies]
automod = "1.0"
rustversion = "1.0"
serde_bytes = "0.11"
serde_derive = "1.0"
serde_stacker = "0.1"
trybuild = { version = "1.0.19", features = ["diff"] }

[workspace]
members = ["tests/crate"]
automod = "1.0.11"
indoc = "2.0.2"
ref-cast = "1.0.18"
rustversion = "1.0.13"
serde = { version = "1.0.194", features = ["derive"] }
serde_bytes = "0.11.10"
serde_derive = "1.0.166"
serde_stacker = "0.1.8"
trybuild = { version = "1.0.81", features = ["diff"] }

[package.metadata.docs.rs]
features = ["raw_value", "unbounded_depth"]
features = ["preserve_order", "raw_value", "unbounded_depth"]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = [
"--generate-link-to-definition",
"--extern-html-root-url=core=https://doc.rust-lang.org",
"--extern-html-root-url=alloc=https://doc.rust-lang.org",
"--extern-html-root-url=std=https://doc.rust-lang.org",
]

[package.metadata.playground]
features = ["raw_value"]
features = ["float_roundtrip", "raw_value", "unbounded_depth"]


### FEATURES #################################################################

[features]
default = ["std"]

std = ["serde/std"]
std = ["memchr/std", "serde/std"]

# Provide integration for heap-allocated collections without depending on the
# rest of the Rust standard library.
# NOTE: Disabling both `std` *and* `alloc` features is not supported yet.
# Available on Rust 1.36+.
alloc = ["serde/alloc"]

# Make serde_json::Map use a representation which maintains insertion order.
# This allows data to be read into a Value and written back to a JSON string
# while preserving the order of map keys in the input.
preserve_order = ["indexmap"]
preserve_order = ["indexmap", "std"]

# Use sufficient precision when parsing fixed precision floats from JSON to
# ensure that they maintain accuracy when round-tripped through JSON. This comes
Expand Down
25 changes: 0 additions & 25 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading