Hi,
> I see, I just wonder how the Axon Framework was able to achieve this.
> This is one of the unit test code I found for the
> DBObjectXStreamSerializer:
>
> @Test
> public void testSerializeAndDeserializeDomainEvent() {
> SerializedObject<byte[]> serializedEvent =
> testSubject.serialize(new TestEvent("Henk"), byte[].class);
> assertNotNull(serializedEvent.getData());
> Object actualResult = testSubject.deserialize(serializedEvent);
> assertTrue(actualResult instanceof TestEvent);
> TestEvent actualEvent = (TestEvent) actualResult;
> assertEquals("Henk", actualEvent.getName());
> }
Well, when you look in to the JSONWriter implementation, you'll see that the
writer gets the information, that the provided String value was e.g.
originally an integer. However, this is required, since these values are
written in a different format in JSON. Nobody stops you from converting this
String into an integer again, get a native interface for an underlying BSON
writer and do what you have to do. But I doubt that you will get anything
efficient.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email