Commit Graph

92 Commits

Author SHA1 Message Date
Erick Tryzelaar
561a373d19 Merge branch 'v0.6.x'
# Conflicts:
#	serde/src/de/mod.rs
#	serde_codegen/src/attr.rs
#	serde_codegen/src/de.rs
#	serde_codegen/src/lib.rs
2016-02-12 21:43:23 -08:00
Erick Tryzelaar
32163cd53b feat(cargo): Version bump 2016-02-12 21:06:47 -08:00
Erick Tryzelaar
46f88037db Merge branch 'v0.6.x' 2016-02-08 14:17:26 -08:00
Erick Tryzelaar
7a3e3a61f4 chore(tests): Silence some warnings 2016-02-08 13:37:03 -08:00
Erick Tryzelaar
517c2f79b7 chore(cargo): Only depend on clippy when testing 2016-02-08 13:35:26 -08:00
Erick Tryzelaar
0224e212f9 feat(codegen): Allow containers to be renamed
Closes #218
2016-02-08 11:11:36 -08:00
Erick Tryzelaar
5ad784f6c6 refactor(tests): Improve test names 2016-02-08 10:43:41 -08:00
Erick Tryzelaar
b842164fd8 feat(codegen): Support renames that are different when serializing and deserializing
According to #61, if one uses serde to serialize requests that pass
url-encoded parameters to a server, it might get responses back
with a different capitalization scheme. This patch restores the
behavior implemented in #62.

# Conflicts:
#	serde_codegen/src/attr.rs
#	serde_codegen/src/de.rs
#	serde_tests/tests/test_annotations.rs
2016-02-08 10:43:41 -08:00
Erick Tryzelaar
365e5129af refactor(codegen): Add VariantAttrs 2016-02-08 10:43:32 -08:00
Erick Tryzelaar
d0ee5b0b4b feat(codegen): Remove {Ser,Deser}ializer::format
This feature has never been used, and it's complicating the
implementation of #207. We could restore this functionality if there is
ever interest in it.

Closes #211.
2016-02-08 10:10:00 -08:00
Erick Tryzelaar
f1b20577d3 feat(ser): Add ser::Error trait; avoid panic when serializing Paths
The only way to safely serialize a `Path` is to use
`.to_string_lossy()`, which replaces invalid UTF-8 characters with
the U+FFFD replacement character. Unfortunately this would lose
information, so for our default implementations, it'd be better
to punt and report an error, and leave it up to the user to
decide if they want to use the lossy encoding.

Unfortunately, we had no way for `Serializer`s to require some methods
on `Serializer::Error`, so there was no way before this patch for
the `Path` implementation to generically report that it cannot encode
this value. This adds that implementation.

breaking-change

Closes #57.
2016-01-28 10:41:21 -08:00
Erick Tryzelaar
9ae47a261e Merge branch 'v0.6.x'
# Conflicts:
#	serde/src/de/impls.rs
#	serde_codegen/src/de.rs
2016-01-28 09:49:15 -08:00
Erick Tryzelaar
4507eaec5b Use deserializer.visit_string for PathBuf 2016-01-28 09:45:38 -08:00
Erick Tryzelaar
c072025982 Merge branch 'v0.6.x' 2016-01-26 14:06:43 -08:00
Simon Persson
a5d0703e44 Bump clippy dependency to compile on 1.8. 2016-01-23 16:15:31 -08:00
Erick Tryzelaar
d1e39db61e Merge branch 'v0.6.x' 2016-01-18 13:09:31 -08:00
Erick Tryzelaar
8087b7cec6 fix(cargo): Bump clippy version 2016-01-18 13:00:21 -08:00
Erick Tryzelaar
42b8b6153e Merge branch 'v0.6.x' into master
# Conflicts:
#	serde/Cargo.toml
#	serde/src/ser/impls.rs
#	serde_codegen/src/attr.rs
#	serde_codegen/src/de.rs
#	serde_codegen/src/field.rs
#	serde_codegen/src/ser.rs
2016-01-18 12:45:39 -08:00
Erick Tryzelaar
8df841f048 fix(errors): Report errors on unknown #[serde(...)] attributes
Closes #51, #175, and #187
2016-01-18 12:39:46 -08:00
Erick Tryzelaar
bfa2b69193 feat(clippy): Use clippy for it's extra lints 2016-01-18 12:24:03 -08:00
Erick Tryzelaar
2aefa5bb1d Merge pull request #204 from JohnHeitmann/master
Implemented disallow_unknown
2016-01-16 13:32:20 -08:00
Erick Tryzelaar
4c92b877d6 Merge branch 'v0.6.x' 2016-01-16 13:17:38 -08:00
Erick Tryzelaar
342ea25290 feat(cargo): Version bump 2016-01-13 07:05:32 -08:00
John Heitmann
8c57f433ff s/disallow_unknown/deny_unknown_fields/ 2016-01-11 10:20:07 -08:00
John Heitmann
bfac1a581c Implemented disallow_unknown
* Added codegen for disallow_unknown
* ... with new default to ignore unknown values during deserialization
* Added ContainerAttrs
2016-01-10 19:34:48 -08:00
Erick Tryzelaar
59285f627b Merge branch 'v0.6.x'
# Conflicts:
#	serde_codegen/Cargo.toml
2016-01-10 11:54:46 -08:00
Erick Tryzelaar
8038832a79 fix(cargo): Version bump 2016-01-07 14:48:40 -08:00
Erick Tryzelaar
072ff149f5 fix(rustup): Update to latest rust; silence some warnings 2015-12-24 12:12:03 -05:00
Erick Tryzelaar
e1a44293c0 Merge pull request #162 from skade/std-error
Have serde:🇩🇪:Error require std::error::Error
2015-12-08 14:10:45 -05:00
Erick Tryzelaar
188425ffe5 Merge branch 'v0.6.x' into master
# Conflicts:
#	serde_codegen/Cargo.toml
2015-12-08 09:50:10 -05:00
Erick Tryzelaar
b3b3b7d565 fix(rustup): Sync serde_macros with latest nightly, aster, and quasi 2015-12-08 09:41:57 -05:00
Erick Tryzelaar
1a8a11e924 feat(impls): Add impls for num::{BigInt,BigUint,Complex,Ratio} 2015-12-01 09:03:08 -08:00
Erick Tryzelaar
b858cd9e18 Merge remote-tracking branch 'remotes/origin/v0.6.x'
# Conflicts:
#	serde_codegen/Cargo.toml
2015-11-28 21:16:51 -08:00
Erick Tryzelaar
af6fbba9b8 feat(cargo): Bump syntex, aster, and quasi versions 2015-11-22 21:56:44 -08:00
Erick Tryzelaar
a577574cfe feat(cargo): Bump syntex, aster, and quasi versions 2015-11-09 13:50:53 -08:00
Erick Tryzelaar
f474c57881 Merge branch 'v0.6.x' 2015-11-02 20:39:32 -08:00
Erick Tryzelaar
7521db7b0b fix(crates): Bump aster and syntex_syntax 2015-11-01 13:24:26 -08:00
Oliver Schneider
51912e6197 test(#151): update tests and benchmarks: visit -> (de)serialize 2015-10-20 09:30:15 +02:00
Erick Tryzelaar
bf31feebc4 chore(cleanup): Fix some warnings 2015-10-19 08:37:22 -07:00
Erick Tryzelaar
55de7bd99b fix(tests): Get tests to compile with new value deserializer scheme 2015-10-19 08:33:57 -07:00
Florian Gilcher
fc19895237 Have serde:🇩🇪:Error require std::error::Error 2015-09-24 07:03:36 -07:00
Erick Tryzelaar
c4392ff256 feat(codegen): Add more attributes to skip serializing
These attributes are `#[serde(skip_serializing_if_none)]` and
`#[serde(skip_serializing_if_empty)]`.
2015-09-07 16:58:52 -07:00
Erick Tryzelaar
fa3460e0a7 Migrate serde_json into it's own repo
New location is https://github.com/serde-rs/json.
2015-08-29 18:09:51 -07:00
Erick Tryzelaar
42069ca669 Refactor tests to not use serde_json 2015-08-29 17:29:42 -07:00
Erick Tryzelaar
4f6b27eec1 Black box json benchmark numbers
This prevents the optimizer from optimizing away the thing
we're benchmarking.
2015-08-13 22:30:02 -07:00
Erick Tryzelaar
fe20852b2c Reject serializing maps to JSON with non-string keys
Closes #122. This is a breaking change since it modifies the
return type of serde_json::to_vec{,pretty}, so it'll require a major
version bump of serde_json.
2015-08-13 22:29:13 -07:00
Erick Tryzelaar
7fb2bd50bf Add a string argument to Error::syntax() 2015-08-07 08:08:56 -07:00
Erick Tryzelaar
2aeb51ad51 Remove "_error" from de::Error::*_error 2015-08-07 07:53:22 -07:00
Erick Tryzelaar
1d9c707a76 Rewrite json parser to not require consuming the full stream
Closes #89
2015-08-06 11:12:37 -07:00
Erick Tryzelaar
fd84aec485 Fix parsing min, max, and epsilon f64 values 2015-08-05 08:15:47 -07:00