68 Commits

Author SHA1 Message Date
David Tolnay
bcad4a9460
Allow map key to be borrowed from &Value 2018-11-09 09:13:51 -08:00
David Tolnay
b3001f48ee
Format with rustfmt 0.99.6-nightly 2018-11-06 14:22:39 -08:00
David Tolnay
5186b8f566
Update ui tests at nightly 2018-10-26 2018-10-27 18:14:48 -07:00
David Tolnay
2161f0540f
Fix overflow on i32::min_value() as exponent 2018-10-03 22:23:48 -07:00
Jihyun Yu
ab670b4e9f fix bug on error position 2018-09-29 15:39:58 +09:00
David Tolnay
a45b5c592a
Fix malicious arbitrary precision number test 2018-09-20 10:48:48 -07:00
David Tolnay
82abb08f90
Use Box<RawValue> as the owned raw value 2018-09-20 01:34:12 -07:00
David Tolnay
9c60f196f2
Split RawSlice and RawValue 2018-09-19 23:01:26 -07:00
David Tolnay
f96b59d6b3
Cfg gate everything having to do with RawValue 2018-09-17 08:11:00 -07:00
Sam Rijs
6d38232a2c Implement RawValue type
fixes #355
2018-09-14 20:11:44 +10:00
David Tolnay
5c931e0536
Make json macro compatible with deny(unused_results)
The unused_results lint triggers on any function call returning anything
other than () or ! that is not used. The Map::insert function returns
Option<Value> of the previous value of the inserted key.
2018-07-16 09:35:44 -07:00
David Tolnay
1b36cec484
Format with rustfmt 0.8.2 2018-07-08 19:01:20 -07:00
David Tolnay
9530ff6337
Skip auto formatting test_stream macro 2018-07-08 19:01:02 -07:00
David Tolnay
22046a50dc
Produce eof error on truncated ident 2018-06-24 16:31:12 -07:00
David Tolnay
7efc0972cd
Add some rules to catch json macro syntax errors 2018-06-24 15:32:21 -07:00
David Tolnay
25b5dfbb6c
Improve error message of unexpected colon or comma in json macro
These rules regressed when the unimplemented macro began accepting
formatter arguments.
2018-06-24 15:16:20 -07:00
David Tolnay
75312089bd
Format with rustfmt 0.8.2 2018-06-16 19:58:12 -07:00
David Tolnay
9316c31625
Add tests for map with char keys 2018-06-16 19:58:11 -07:00
David Tolnay
1e64efc65a
Basic support for i128 and u128 2018-05-26 15:20:58 -07:00
David Tolnay
8ffe4d8222
Format with rustfmt 0.7.0 2018-05-26 11:44:13 -07:00
David Tolnay
961a5f018e
Update invalid length error messages for serde 1.0.52 2018-05-09 14:25:22 -07:00
David Tolnay
1a9d024e5f
Format with rustfmt 0.4.2 2018-04-17 00:19:50 -07:00
David Tolnay
a66a00b0f6
Struct deserialization from array Value 2018-04-16 22:36:49 -07:00
David Tolnay
28ea01fbb9
Cleaner Debug representation of Error 2018-03-28 15:08:47 +02:00
David Tolnay
2311fb3e86
Update ui tests for nightly-2018-03-26 2018-03-27 10:35:42 +02:00
David Tolnay
654e6e8349
Format with rustfmt 0.4.1 2018-03-27 10:24:10 +02:00
Alexander Regueiro
31bba4b5a1 Arbitrary-precision numerics support (#416)
Added support for arbitrary-precision numerics, in a similar way that the toml crate does for date-times (using an internal special struct).
2018-03-21 12:09:36 -07:00
David Tolnay
92c23fb828
Ignore unreadable_literal lint in tests 2018-03-17 12:56:05 -07:00
David Tolnay
c58b5201e1
Update ui tests for nightly-2018-03-16 2018-03-17 12:50:08 -07:00
David Tolnay
aa63c9302d
Update ui tests for nightly-2018-03-03 2018-03-03 19:50:31 -08:00
David Tolnay
9de293da39
Merge pull request #414 from boxofrox/fix/issue-364
Improve error when json strings contain control characters
2018-02-27 17:03:14 -08:00
Justin Charette
cc6304ee06 Improve error when json strings contain control characters
Signed-off-by: Justin Charette <charetjc@gmail.com>
2018-02-27 19:23:23 -05:00
David Tolnay
240c6fec53
Update ui tests for nightly-2018-02-26 2018-02-27 10:52:30 -08:00
David Tolnay
bfd4562d74
Hide Number implementation details from Debug representation 2017-12-30 13:28:30 -05:00
David Tolnay
81c7298c86
Test the debug representations of Number and Value 2017-12-30 13:21:00 -05:00
David Tolnay
0961dbe9e7
Implement all the deserializer hints
This is a way to avoid instantiating all the Visitor methods on every
Visitor that is used with serde_json. If the Deserialize impl hints
that a boolean is required by invoking deserialize_bool, we don't also
need to instantiate its visit_u64 and visit_i64 and visit_f64 and
visit_str and visit_borrowed_str and visit_unit and visit_seq and
visit_map methods if the input contains some other type. Instead we
render the invalid_type error in a central place in the serde_json
Deserializer that is instantiated just once.

Improves compile time of json-benchmark by 30%.
2017-12-03 21:50:23 -08:00
David Tolnay
3549437f4a
Merge pull request #384 from bouk/stream-literals
Support top-level primitives in StreamDeserializer
2017-12-01 10:43:18 -08:00
Bouke van der Bijl
8b486189b7
Support top-level primitives in StreamDeserializer 2017-12-01 18:41:25 +01:00
David Tolnay
a4b2223762
Update ui tests to include nightly wording change 2017-11-28 22:00:25 -08:00
David Tolnay
ba3c859d58
Update stderr files for -Z external-macro-backtrace 2017-11-22 08:50:41 -08:00
David Tolnay
3dad80b406
Remove unnecessary 'static in consts 2017-10-29 22:05:11 -07:00
David Tolnay
deede62d1b
Add error banner when running test suite without nightly compiler 2017-10-22 15:57:00 -07:00
David Tolnay
2a91a88581
Update ui test failure message 2017-09-23 12:23:58 -07:00
fmoor
1b02cfec24 add ErrorCode::TrailingComma 2017-09-05 17:25:17 -07:00
fmoor
4afb61cc02 change error type for trailing commas, fixes #352 2017-09-05 17:25:17 -07:00
David Tolnay
79db7d4fe7
Optimize deserialize_ignored_any 2017-09-04 13:26:50 -07:00
David Tolnay
66b37bd0dd
Replace deprecated compiletest::default_config() 2017-08-24 00:23:16 -07:00
David Tolnay
1aa61215b2
Update ui error message 2017-07-20 23:26:29 -07:00
SeongChan Lee
7fbf18e95e Implement PartialEq<bool> for Value 2017-07-13 04:12:38 +09:00
David Tolnay
58a7642d09
Update ui error message 2017-07-09 10:03:02 -07:00