Jackson also does YAML! I think that might be our best bet, although Java
1.7 did add a JSON API similar to JAXB.


On 31 March 2014 19:34, Gary Gregory <[email protected]> wrote:

> On Mon, Mar 31, 2014 at 10:21 AM, Ralph Goers 
> <[email protected]>wrote:
>
>> Jackson will do both the JSON and XML if you want.  If you can manage to
>> use the Proxy I think that would be better.
>>
>> Ralph
>>
>> So the options are:
>
> - JRE JAXB can do XML but not JSON
> - Eclipse JAXB ("MOXy") can do XML and JSON
> - Jackson can do both XML and JSON
>
> Because we already depend on Jackson it sounds like I should use that
> instead of JAXB.
>
> Thoughts?
>
> Gary
>
> On Mar 31, 2014, at 7:04 AM, Gary Gregory <[email protected]> wrote:
>>
>> On Mon, Mar 31, 2014 at 2:36 AM, Ralph Goers 
>> <[email protected]>wrote:
>>
>>> Out of curiosity, why does implementing an XML socket server require
>>> touching the LogEvent?  What are XMLLogEventInput and JSONLogEventInput
>>> going to do that would require that?
>>>
>>
>> My current working implementation uses JAXB annotations on Log4jLogEvent,
>> no need to deal with messy DOM nonsense. The XML layout can then be a one
>> liner: JAXB.marshal(logEvent, result). Right now the socket server ends up
>> also with a one liner to convert from XML to a Log4jLogEvent.
>>
>> But I could do it in the existing "proxy" log event instead or a new XML
>> proxy instead of in Log4jLogEvent. I'm not sure why we'd want to create an
>> extra object. So I am asking...
>>
>>  Gary
>>
>>>
>>> Ralph
>>>
>>> On Mar 30, 2014, at 8:04 PM, Gary Gregory <[email protected]>
>>> wrote:
>>>
>>> As I am working on 
>>> LOG4J2-583<https://issues.apache.org/jira/browse/LOG4J2-583>I ran into 
>>> core.impl.Log4jLogEvent.LogEventProxy.
>>>
>>> - LogEventProxy is used to move events across threads internally
>>> - A real Log4jLogEvent is used in the SerializedLayout.
>>>
>>> Why the different?
>>>
>>> As you answer, if you can avoid committing to Log4jLogEvent that would
>>> be great as I currently have pending changes there related to
>>> LOG4J2-583. <https://issues.apache.org/jira/browse/LOG4J2-583>
>>>
>>> I am wondering if SerializedLayout should use LogEventProxy or if
>>> LogEventProxy is a leftover from old development.
>>>
>>> Thank you,
>>> Gary
>>> --
>>> E-Mail: [email protected] | [email protected]
>>> Java Persistence with Hibernate, Second 
>>> Edition<http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>>
>>>
>>
>>
>> --
>> E-Mail: [email protected] | [email protected]
>> Java Persistence with Hibernate, Second 
>> Edition<http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>
>
> --
> E-Mail: [email protected] | [email protected]
> Java Persistence with Hibernate, Second 
> Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Matt Sicker <[email protected]>

Reply via email to