Commit graph

143 commits

Author SHA1 Message Date
Jonathan Wood b550e638c7 Run burntsushi tests on TomlWriter, where possible. 2015-06-28 13:54:29 -07:00
Jonathan Wood 1a0d38bc72 Improve wording for array whitespace controls 2015-06-28 13:37:47 -07:00
Jonathan Wood 77f7b922be Fix escaping of back slashes. 2015-06-28 13:35:34 -07:00
Jonathan Wood 3d90260d32 Add methods to control date formatting and time zones. 2015-06-28 11:52:40 -07:00
Jonathan Wood ecbd9f048d Add a way to control spacing around array brackets. 2015-06-28 11:26:49 -07:00
Jonathan Wood 72941c146d Add writer indentation policy controls.
Set the default indentation to 0.
2015-06-28 10:30:35 -07:00
Jonathan Wood 24a6503d19 Conform to the project's singleton pattern. 2015-06-27 14:35:26 -07:00
Jonathan Wood 8b3652a309 Remove classes merged into Converters. 2015-06-27 14:27:38 -07:00
Jonathan Wood ec30be7901 Move Toml.write() to TomlWriter.
Add TomlWriter methods for writing to File, Writer, and OutputStream
targets.
2015-06-27 14:19:40 -07:00
Jonathan Wood acc952a572 Remove Toml.serialize(). 2015-06-27 13:11:52 -07:00
Jonathan Wood c076099ddd Use 'write' rather than 'serialize'.
Also refactor ValueWriter implementations into ValueConverter
implementations, where possible.
2015-06-27 12:50:15 -07:00
Jonathan Wood b729e450ab Fix thread-safety issue in DateSerializer. 2015-06-25 09:21:36 -07:00
Jonathan Wood 1216a009cb 4 -> 2 spaces 2015-06-25 08:01:34 -07:00
Jonathan Wood 64afb09d96 Java-6 style date/tz formatting 2015-06-24 23:35:19 -07:00
Jonathan Wood 9f717384a4 Don't use java.util.function.Predicate.
It is a Java-8 addition.
2015-06-24 22:14:42 -07:00
Jonathan Wood f8f55a6f16 Merge remote-tracking branch 'upstream/wip' into merge
Conflicts:
	README.md
	src/main/java/com/moandjiezana/toml/Toml.java
2015-06-24 21:49:24 -07:00
Jonathan Wood e7d7de7ae5 Implement serialization.
This provides functionality to convert populated Toml instances
and arbitrary objects into TOML.
2015-06-24 21:40:06 -07:00
moandji.ezana 38666593dd Added Toml#contains(String) and Toml#containsXxx(String) methods 2015-06-24 01:07:34 +02:00
moandji.ezana 1b2aa582d9 Removed trailing newlines from error messages.
Fixes https://github.com/mwanji/toml4j/issues/18
2015-06-23 23:46:35 +02:00
moandji.ezana 4074242e0b Using a private implementation of Map.Entry instead of public Toml.Entry
class
2015-06-23 23:05:18 +02:00
moandji.ezana 68513b0851 Added to Toml#entrySet() documentation 2015-06-23 23:05:18 +02:00
moandji.ezana 15c014a327 Added documentation 2015-06-23 23:05:18 +02:00
moandji.ezana a0bd307f58 Added Toml#entrySet() 2015-06-23 23:05:18 +02:00
moandji.ezana ae2911c82c Toml#getTables() returns null for missing keys and indices 2015-04-29 22:10:30 +02:00
moandji.ezana 24a5134c2c getTable() and getTables() return null for missing keys 2015-04-29 21:46:22 +02:00
moandji.ezana a342b1fef6 Toml#getList() returns null if key is missing 2015-04-29 20:30:11 +02:00
moandji.ezana 4d32f77ce0 Removed Toml#to(Class, Gson) 2015-04-29 00:19:39 +02:00
moandji.ezana 8cae6c2e32 Improved error message when key overwrites table 2015-04-13 13:23:58 +02:00
moandji.ezana 0795127266 New error message when table overwrites existing key definition 2015-04-13 13:04:10 +02:00
moandji.ezana 439d1c600d Fixed typo 2015-03-30 22:46:13 +02:00
moandji.ezana d958baebb5 Added getArray(String, List) 2015-03-30 22:45:15 +02:00
moandji.ezana 7f11f97020 Merge branch 'default_values' of git://github.com/udiabon/toml4j into default_values 2015-03-30 21:51:33 +02:00
Nick Jiang 414bd396fa Call original method to avoid duplicated work. 2015-03-27 10:13:09 +08:00
Nick Jiang bc04eec538 Returns the default value if the key was not found. 2015-03-26 16:50:48 +08:00
moandji.ezana 8c66284960 In number, underscore after dot is invalid 2015-02-17 10:24:45 +02:00
moandji.ezana a3edb55e9c Merge branch 'underscores_in_numbers' into wip. Fixed version example
test.

Conflicts:
	src/main/java/com/moandjiezana/toml/NumberConverter.java
2015-02-17 10:21:17 +02:00
moandji.ezana 4e22176f1e Improved duplicate table detection. Improved line reporting. 2015-02-16 13:33:02 +02:00
moandji.ezana 2b9af91bf4 Improved detection of invalid use of inline tables. 2015-02-15 01:44:13 +02:00
moandji.ezana 40f12ca3b1 Throw exception when duplicate keys are defined inside an inline table 2015-02-14 02:39:39 +02:00
moandji.ezana 14896a6033 Code coverage improvements 2015-02-14 01:36:14 +02:00
moandji.ezana ba98daeb85 Added Toml#isEmpty()
Added tests for navigation to non-existant keys
2015-02-13 09:09:05 +02:00
moandji.ezana ca7fcc766b Removed unused methods and variables 2015-02-13 08:44:54 +02:00
moandji.ezana be85328555 Javadoc improvements 2015-02-13 08:43:35 +02:00
moandji.ezana cdef758f4c Made TomlParser#run(String) static 2015-02-13 08:19:40 +02:00
moandji.ezana b69f8514cb Deleted unused constant 2015-02-13 08:18:56 +02:00
moandji.ezana 96220b7a88 The TOML string is never transformed into an array 2015-02-12 23:25:10 +02:00
moandji.ezana 8388e394ed Removed unused methods 2015-02-12 23:12:50 +02:00
moandji.ezana 1c87a9e85a Improved bare key validation and quoted key support 2015-02-12 22:38:17 +02:00
moandji.ezana 8a6ca61101 Cleaned up bare key handling and started cleaning up identifier
validation
2015-02-12 11:21:00 +02:00
moandji.ezana 7292fe5468 Added Results.Errors to Context constructor and Context.with(Identifier) 2015-02-12 08:33:43 +02:00