[
https://issues.apache.org/jira/browse/CHAIN-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Simone Tripodi updated CHAIN-76:
--------------------------------
Attachment: CHAIN-76_proto.patch
Here we go!
I attached the initial prototype, not intended to be committed, just to show
the PoC I had in mind on how the multi-format parser should be implemented.
If you want to join me on that development, please notice that web/samples
modules have not been updated - the purpose is fixing the parsers first!
The very basic idea is combining the power of Jackson with the
{{ServiceLoader}} (Chain2 now targets Java6) where
{{org.apache.commons.chain2.config.ChainConfigurationParser}} class in the
{{configuration/api}} module plays the main role of parsing input
configurations depending on the input configuration format.
Deserialization is where I asked Tatu's
[help|http://jackson-users.ning.com/forum/topics/objectfactories-for-some-parsed-elements]
due to my poor experience with Jackson deserializers.
So, JSON will be the main supported format, other formats (XML, YAML, Smile)
can be load via {{ServiceLoader}} simply just adding the related modules in the
classpath. That would make easier keep ingested configuration formats each time
Jackson supports a new one - we can just develop the bridge module and release
it alone, not needed to make a release of the whole project.
At that stage, what I would like to reach, is a status where all tests in
configuration modules pass. I don't mind if web/samples would be broken, we can
fix them later.
> Adopt Jackson as underlying parser for Configurations
> -----------------------------------------------------
>
> Key: CHAIN-76
> URL: https://issues.apache.org/jira/browse/CHAIN-76
> Project: Commons Chain
> Issue Type: Task
> Affects Versions: 2.0
> Reporter: Simone Tripodi
> Fix For: 2.0
>
> Attachments: CHAIN-76_proto.patch
>
>
> [Jackson|http://wiki.fasterxml.com/JacksonHome] supports data format
> [auto-detection|http://www.cowtowncoder.com/blog/archives/2012/04/entry_472.html]
> for formats such as JSON, XML, Smile and YAML, so it would be possible that
> with just one {{ConfigurationParser}} implementation we are able to handle
> multiple textual configuration formats.
> In that way we can stay with just one module for configuration and no more
> need to implement a specific module for each desired format.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira