Commit graph

33 commits

Author SHA1 Message Date
Alex Crichton ea0c2296e6 Merge pull request #204 from vitiral/rc_settings
reference count settings to bump performance a bit
2017-07-31 10:58:48 -05:00
Garrett Berg 9443fbf01f back out doc changes for now 2017-07-30 10:19:32 -06:00
Garrett Berg eb69fee5ff doc fixes 2017-07-30 10:18:00 -06:00
Garrett Berg 003a65fc9f reference count settings to bump performance a bit 2017-07-29 00:41:35 -06:00
Garrett Berg 54a4833bc1 add """ for non-literals with newlines, clean up logic and add tests 2017-07-28 09:25:53 -06:00
Garrett Berg dabe477d64 make single lines also pretty 2017-07-28 07:14:37 -06:00
Garrett Berg 83be829f0b fix bugs with pretty 2017-07-27 22:01:36 -06:00
Garrett Berg 61ff3c295c close #199: add header information for empty structs
- also add test which fails without this change
- also add a few helpful unit tests to table
2017-07-27 07:03:52 -06:00
Garrett Berg 203b4d43c2 fix Serializer::pretty_array(false) 2017-07-24 09:46:24 -06:00
Garrett Berg fba6170b95 use ignore rather than no_run for toml blocks 2017-07-24 09:18:47 -06:00
Garrett Berg ec82e695ba fix docs and add 2017-07-22 15:11:23 -06:00
Garrett Berg 973e4cc8c7 fix " 2017-07-21 12:03:42 -06:00
Garrett Berg 1e060c55d6 use builder pattern 2017-07-20 12:47:51 -06:00
Garrett Berg 3ec47e6758 pretty arrays 2017-07-09 15:20:29 -06:00
Garrett Berg 27757113ec array doesn't break anything... 2017-07-09 15:10:36 -06:00
Garrett Berg fe894fee6c add pretty sting serialization 2017-07-09 14:58:48 -06:00
Garrett Berg 36a4ebd3bf add Settings struct 2017-07-09 14:38:48 -06:00
Alan Du ce7b96c47b Add toml::ser::Error::KeyNewline back in
Avoid a breaking change
2017-06-01 22:47:24 +01:00
Alan Du bad367cab0 Allow serializing keys with \n in them
Use special quoted form

Closes https://github.com/alexcrichton/toml-rs/issues/185
2017-06-01 20:59:26 +01:00
Alan Du d8cc119799 Close #180 2017-06-01 12:42:16 +01:00
Alex Crichton 9a8c5d8e96 Merge pull request #183 from alanhdu/invalid_number
Better invalid number handling
2017-05-30 19:37:44 -05:00
Alan Du 87f51b38d1 Error when trying to serialize invalid float 2017-05-31 00:30:58 +01:00
Alan Du 90bdb7e96d Encode control characters with hex not decimal
Fix https://github.com/alexcrichton/toml-rs/issues/178
2017-05-30 23:55:09 +01:00
Raphaël Huchet d5ffc6cc60 add example for to_string 2017-05-10 17:39:19 +02:00
Vincent Prouillet a6f22570ae Address comment and make test pass 2017-04-28 13:00:37 +09:00
Vincent Prouillet 7cb357c168 Allow to deserialize/serialize into enums
Close #164
2017-04-24 22:13:38 +09:00
Alex Crichton dc5ff1ef90 Support serde 1.0.0 2017-04-20 10:16:00 -07:00
Daniel Lockyer cecb0b58a7 Stop taking references when not needed 2017-04-12 09:29:00 +01:00
Daniel Lockyer 3034a7cf52 Simplify if-statements 2017-04-12 09:28:56 +01:00
Alex Crichton edf22b74a1 Add support for serialize_bytes
Just serialize as a list of numbers.

Closes #150
2017-02-21 06:21:00 -08:00
Alex Crichton 67fb9f1953 Add a serialization helper to put tables last
This should help serializing maps where it's unknown up front whether the tables
and/or values come first.

Closes #142
2017-02-10 15:29:36 -08:00
Jonas mg b5ec7d2c33 Update ser.rs 2017-02-10 14:37:47 +00:00
Alex Crichton e256931e9b Rewrite crate with serde support from ground up
This commit completely rewrites this crate from the ground up,
supporting serde at the lowest levels as I believe serde support was
intended to do. This is a major change from the previous versions of
this crate, with a summary of changes being:

* Serialization directly to TOML is now supported without going through
  a `Value` first.

* Deserialization directly from TOML is now supported without going
  through a `Value`. Note that due to the TOML format some values still
  are buffered in intermediate memory, but overall this should be at a
  minimum now.

* The API of `Value` was overhauled to match the API of
  `serde_json::Value`. The changes here were to:

  * Add `is_*` accessors
  * Add `get` and `get_mut` for one-field lookups.
  * Implement panicking lookups through `Index`

  The old `index` methods are now gone in favor of `get` and `Index`
  implementations.

* A `Datetime` type has been added to represent a TOML datetime in a
  first-class fashion. Currently this type provides no accessors other
  than a `Display` implementation, but the idea is that this will grow
  support over time for decomposing the date.

* Support for the `rustc-serialize` crate has been dropped, that'll stay
  on the 0.2 and 0.1 release trains.

* This crate no longer supports the detection of unused fields, for that though
  you can use the `serde_ignored` crate on crates.io
2017-02-08 21:21:18 -08:00