This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit cb0ddf6baed8169b78077487983a1008cb83c000
Author: Paul King <[email protected]>
AuthorDate: Mon Apr 13 05:36:39 2026 +1000

    tweak doco
---
 subprojects/groovy-csv/src/spec/doc/csv-userguide.adoc   | 4 +++-
 subprojects/groovy-toml/src/spec/doc/toml-userguide.adoc | 5 +++++
 subprojects/groovy-yaml/src/spec/doc/yaml-userguide.adoc | 5 +++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/subprojects/groovy-csv/src/spec/doc/csv-userguide.adoc 
b/subprojects/groovy-csv/src/spec/doc/csv-userguide.adoc
index 853970c701..4f361f6379 100644
--- a/subprojects/groovy-csv/src/spec/doc/csv-userguide.adoc
+++ b/subprojects/groovy-csv/src/spec/doc/csv-userguide.adoc
@@ -64,7 +64,9 @@ 
include::../test/groovy/csv/CsvSlurperTest.groovy[tags=quoted_fields,indent=0]
 
 `CsvSlurper` can parse CSV directly into typed objects using Jackson 
databinding.
 Standard Jackson annotations such as `@JsonProperty` and `@JsonFormat` are 
supported
-for column name mapping and type conversion:
+for column name mapping and type conversion.
+This is particularly useful for CSV since all values are strings — Jackson 
handles
+the conversion to numeric, date, and other types automatically:
 
 [source,groovy]
 ----
diff --git a/subprojects/groovy-toml/src/spec/doc/toml-userguide.adoc 
b/subprojects/groovy-toml/src/spec/doc/toml-userguide.adoc
index a160bc857c..0b65c8ee89 100644
--- a/subprojects/groovy-toml/src/spec/doc/toml-userguide.adoc
+++ b/subprojects/groovy-toml/src/spec/doc/toml-userguide.adoc
@@ -106,6 +106,11 @@ 
include::../test/groovy/toml/TomlParserTest.groovy[tags=typed_class,indent=0]
 include::../test/groovy/toml/TomlParserTest.groovy[tags=typed_parsing,indent=0]
 ----
 
+NOTE: For simple cases, Groovy's `as` coercion also works with the untyped 
result:
+`def config = new TomlSlurper().parseText(toml) as ServerConfig`.
+The `parseTextAs` method uses Jackson databinding, which supports richer 
annotation-driven
+mapping via `@JsonProperty`, `@JsonFormat`, etc.
+
 === Builders
 
 Another way to create TOML from Groovy is to use `TomlBuilder`. The builder 
provide a
diff --git a/subprojects/groovy-yaml/src/spec/doc/yaml-userguide.adoc 
b/subprojects/groovy-yaml/src/spec/doc/yaml-userguide.adoc
index 1334546019..d0d0265c2b 100644
--- a/subprojects/groovy-yaml/src/spec/doc/yaml-userguide.adoc
+++ b/subprojects/groovy-yaml/src/spec/doc/yaml-userguide.adoc
@@ -106,6 +106,11 @@ 
include::../test/groovy/yaml/YamlParserTest.groovy[tags=typed_class,indent=0]
 include::../test/groovy/yaml/YamlParserTest.groovy[tags=typed_parsing,indent=0]
 ----
 
+NOTE: For simple cases, Groovy's `as` coercion also works with the untyped 
result:
+`def config = new YamlSlurper().parseText(yaml) as ServerConfig`.
+The `parseTextAs` method uses Jackson databinding, which supports richer 
annotation-driven
+mapping via `@JsonProperty`, `@JsonFormat`, etc.
+
 === Builders
 
 Another way to create YAML from Groovy is to use `YamlBuilder`. The builder 
provide a

Reply via email to