JsonInputStream for serialization of streams