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

Mark Struberg updated JOHNZON-162:
----------------------------------
    Component/s:     (was: Core)
                 Mapper
                 JSON-B

> support 'implicit converters' for certain types
> -----------------------------------------------
>
>                 Key: JOHNZON-162
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-162
>             Project: Johnzon
>          Issue Type: Bug
>          Components: JSON-B, Mapper
>    Affects Versions: 1.1.7
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>            Priority: Major
>
> We've got a great pull request via github 
> [https://github.com/apache/johnzon/pull/15]
> While the patch is fine I want to still stretch out and implement a feature 
> we similarly added to the ConfigJSR:
> [https://github.com/eclipse/ConfigJSR/blob/master/api/src/main/java/javax/config/spi/Converter.java#L59]
> {quote}
> If no explicit Converter and no built-in Converter could be found for a 
> certain type,
> the \{@code Config} provides an <em>Implicit Converter</em>, if
> * The target type \{@code T} has a Constructor with a String parameter, or
> * The target type \{@code T} has a Constructor with a CharSequence parameter, 
> or
> * the target type \{@code T} has a \{@code static T valueOf(String)} method, 
> or
> * the target type \{@code T} has a \{@code static T valueOf(CharSequence)} 
> method, or
> * the target type \{@code T} has a \{@code static T parse(String)} method, or
> * the target type \{@code T} has a \{@code static T parse(CharSequence)} 
> method
> {quote}
> Since all the java8 time types DO implement one of those signatures we don't 
> need anything more.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to