[ 
https://issues.apache.org/jira/browse/GROOVY-11925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King updated GROOVY-11925:
-------------------------------
    Description: 
The Jackson databind libraries already support Typed data access, but we don't 
expose it via TomlSlurper/TomlBuilder.

*TomlSlurper — new typed parsing methods:*
- `parseTextAs(Class<T>, String)` — parse TOML text into a typed object
- `parseAs(Class<T>, Reader)` — from reader
- `parseAs(Class<T>, InputStream)` — from input stream
- `parseAs(Class<T>, File)` — from file
- `parseAs(Class<T>, Path)` — from path

*TomlBuilder — new typed writing method:*
- `toToml(Object)` — serialize a typed object to a TOML string

All methods use Jackson databinding and support `@JsonProperty`/`@JsonFormat` 
annotations.

  was:The Jackson databind libraries already support Typed data access, but we 
don't expose it via TomlSlurper/TomlBuilder.


> Improve consistency of TOML functionality
> -----------------------------------------
>
>                 Key: GROOVY-11925
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11925
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> The Jackson databind libraries already support Typed data access, but we 
> don't expose it via TomlSlurper/TomlBuilder.
> *TomlSlurper — new typed parsing methods:*
> - `parseTextAs(Class<T>, String)` — parse TOML text into a typed object
> - `parseAs(Class<T>, Reader)` — from reader
> - `parseAs(Class<T>, InputStream)` — from input stream
> - `parseAs(Class<T>, File)` — from file
> - `parseAs(Class<T>, Path)` — from path
> *TomlBuilder — new typed writing method:*
> - `toToml(Object)` — serialize a typed object to a TOML string
> All methods use Jackson databinding and support `@JsonProperty`/`@JsonFormat` 
> annotations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to