Robert Günzler
4e9e0ee19b
Add Encoder/Decoder types ( #192 )
...
Usage is similar to the stdlibs JSON encoder/decoder but I tried to
leave the general structure of the code the same.
Main motivation was to support encoding/decoding options to allow
encoding string-type map keys as quoted TOML keys.
This was implemented on the Encoder with QuoteMapKeys(bool).
> The TOML spec supports using UTF-8 strings as keys.
> https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md#table
2017-10-24 14:10:38 -07:00
Kazuyoshi Kato
878c11e70e
Unmarshal should report a type mismatch as an error ( #196 )
...
Fixes #186
2017-10-21 15:29:03 -07:00
Kazuyoshi Kato
19ece5dc77
Fix typos ( #195 )
...
Most of them are caught by Go Report Card.
https://goreportcard.com/report/github.com/pelletier/go-toml
2017-10-21 15:26:06 -07:00
Thomas Pelletier
2009e44b6f
Improve doc for un/marshal functions ( #189 )
2017-10-01 15:47:47 -07:00
Yvonnick Esnault
690dbc9ee7
Comment annotation for Marshal ( #185 )
2017-10-01 15:05:24 -07:00
Thomas Pelletier
4a000a21a4
Benchmark against other libraries ( #175 )
...
BenchmarkUnmarshalToml-8 1000 1320117 ns/op 450932 B/op 15072 allocs/op
BenchmarkUnmarshalBurntSushiToml-8 3000 402897 ns/op 82900 B/op 1761 allocs/op
BenchmarkUnmarshalJson-8 20000 66092 ns/op 3536 B/op 101 allocs/op
BenchmarkUnmarshalYaml-8 10000 189600 ns/op 44872 B/op 1058 allocs/op
2017-06-25 13:05:13 -07:00
Thomas Pelletier
40ecdac242
Clean up documentation ( #168 )
...
Fixes #135
2017-05-30 18:33:25 -07:00
Thomas Pelletier
685a1f1cb7
Rename TomlTree to Tree ( #159 )
...
Avoid stutter.
Fixes #55
2017-05-10 17:53:23 -07:00
John K. Luebs
53be957dac
Allow unmarshal from any TomlTree ( #157 )
...
Fixes #153
2017-05-07 15:55:38 -07:00
Carolyn Van Slyck
fe206efb84
Provide Marshaler interface ( #151 )
...
The toml.Marhshaler interface allows marshalling custom objects implementing
the interface. Design based off json.Marshaler.
2017-04-04 18:41:05 -07:00
tro3
e32a2e0474
Reflection-based marshaling / unmarshaling ( #149 )
...
Fixes #146
2017-03-29 14:49:41 -07:00