public static Flow < JsonNode , ByteString , NotUsed > json ( String callbackName ) { return Flow . of ( JsonNode . class ) . map ( json -> { return ByteString . fromString ( Json . stringify ( json ) ) ; } ) . via ( flow ( callbackName ) ) ; }
Produces a flow of ByteString using Json . stringify from a Flow of JsonNode . Calls out to Comet . flow internally .