On 6/18/11 13:28 , Niclas Hedhman wrote:
I think that the toXyz() on value should use the I/O style DSL. Not in
mood to look at details, but a
value.format(json()).to( stream(System.out) );
style thing would probably look neat. Keeping toJSON() is probably necessary.
The problem there is that the I/O style API is for moving sets of items
from one place to another, with both parties agreeing on whether it
worked out or now. In the above case there is only one item to be moved
so it seems kinda unnecessary. Doing "String toJSON()" is pretty
straightforward, and after that you can do whatever you want with it.
That said, if the serializing process is extracted from the runtime,
then it would be easy to instantiate a serializer and use streaming
serialization instead of producing a String, so that might cover the
more advanced cases.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev