logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Ståldal (JIRA) <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1034) JsonConfiguration.getObjectMapper may more friendly to json
Date Mon, 23 Nov 2015 08:56:10 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15021771#comment-15021771
] 

Mikael Ståldal commented on LOG4J2-1034:
----------------------------------------

Perhaps we should have a look at [HOCON|https://github.com/typesafehub/config/blob/master/HOCON.md].

> JsonConfiguration.getObjectMapper may more friendly to json
> -----------------------------------------------------------
>
>                 Key: LOG4J2-1034
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1034
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Configurators
>    Affects Versions: 2.5
>            Reporter: takeseem
>            Priority: Minor
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Thanks.
> It's a good idea for JsonConfiguration: 
>  * allow unquoted field names
>  * allow single quotes
> org.apache.logging.log4j.core.config.json.JsonConfiguration.getObjectMapper
> {code}
>     protected ObjectMapper getObjectMapper() {
>         return new ObjectMapper().configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES,
true).configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true).configure(JsonParser.Feature.ALLOW_COMMENTS,
true);
>     }
> {code}
> v2.3: 
> {code}
>     protected ObjectMapper getObjectMapper() {
>         return new ObjectMapper().configure(JsonParser.Feature.ALLOW_COMMENTS, true);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message