Comments (2)
Thats a good question that I overlooked in the docs and have since rectified it.
toml_edit::easy
is meant for when want toml-rs
and toml_edit
but want either consistency in behavior or to keep your number of dependencies low. The design of toml-rs
prevents us from this being format-preserving.
I will say the toml_edit
API has gotten easier over time.
do you guys have any advice on replacing toml-rs?
Porting toml-rs
code to toml_edit
?
My first would be to only focus on doing that where its needed. If you have places where you only read TOML, feel free to keep that using toml-rs
.
Beyond that,
- Check your use of
serde
. We can't preserve formatting through that, though we could make it easier to insert chunks of new TOML data into a format-preserving Document via serde - If you are using the
toml::Value
API, thetoml_edit::Document
API won't be too different. The biggest issue will be that we have two table types,Table
andInlineTable
and two array types,Array
andArrayOfTables
.TableLike
and ourIndex
/IndexMut
APIs help gloss over some of these details.
from toml.
Thanks! This was really helpful, i really appreciate the time!
from toml.
Related Issues (20)
- Missing spans for variant fields HOT 2
- toml fails to compile due to IndexMap HOT 4
- `u128` (and `i128`) serialization are not supported HOT 4
- Feature request: Serializing with comments HOT 1
- Date must be quoted to get parsed HOT 1
- Provide an easy way to deserialize the `toml_edit::Item` HOT 5
- Error to compile on MacOS M1 aarch64 HOT 2
- Cannot deserialize TOML Local Date into `chrono::NaiveDate`. HOT 1
- Deserialisation of non-existent field into `Vec<_>` type fails instead of empty vector HOT 2
- Deserialize from `toml::Value`? HOT 2
- Support for subtable name formatting to match Cargo.toml's Rust-like #[cfg] syntax HOT 7
- Serializing simple enum leads to `UnsupportedType` HOT 4
- What are the semantics of the span in de::error? HOT 3
- Parsed `Key` misbehaves, can panic HOT 2
- Default value for "invalid type" error HOT 2
- Stringy serialization fails with `Error { inner: UnsupportedType(None) }` HOT 2
- [help]About document::document HOT 2
- Top-level shorthand for `ValueSerializer` HOT 3
- Expose span in Document HOT 5
- Generic Value parsing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toml.