mirror of
https://github.com/plexusorg/toml4j.git
synced 2024-10-31 17:29:14 +00:00
Mention in README that transient fields are not serialised
This commit is contained in:
parent
ddeab75689
commit
40f866f5cd
12
README.md
12
README.md
|
@ -236,7 +236,7 @@ toml.containsTableArray("a"); // false
|
||||||
|
|
||||||
### Converting Objects To TOML
|
### Converting Objects To TOML
|
||||||
|
|
||||||
You can write any arbitrary object to a TOML `String`, `File`, `Writer`, or `OutputStream` with a `TomlWriter`. Each TomlWriter instance is customisable, immutable and threadsafe, so it can be reused and passed around. Constants are ignored.
|
You can write any arbitrary object to a TOML `String`, `File`, `Writer`, or `OutputStream` with a `TomlWriter`. Each TomlWriter instance is customisable, immutable and threadsafe, so it can be reused and passed around. Constants and transient fields are ignored.
|
||||||
|
|
||||||
```java
|
```java
|
||||||
class AClass {
|
class AClass {
|
||||||
|
@ -277,11 +277,11 @@ class BClass {
|
||||||
BClass obj = new BClass();
|
BClass obj = new BClass();
|
||||||
obj.aMap.put("item", 1);
|
obj.aMap.put("item", 1);
|
||||||
|
|
||||||
TomlWriter tomlWriter = new TomlWriter.Builder().
|
TomlWriter tomlWriter = new TomlWriter.Builder()
|
||||||
indentValuesBy(2).
|
.indentValuesBy(2)
|
||||||
indentTablesBy(4).
|
.indentTablesBy(4)
|
||||||
padArrayDelimitersBy(3).
|
.padArrayDelimitersBy(3)
|
||||||
build();
|
.build();
|
||||||
|
|
||||||
String tomlString = tomlWriter.write(obj);
|
String tomlString = tomlWriter.write(obj);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue