Java 13 Text Block WITHOUT newline

0 votes
asked Feb 5 by Hitesh Garg (355 points)  

In my test for a repository I have to setup an expected json which will not have any space as I have used Jackson library and the data to persist in database should not even have any space in it.
But at the same time it becomes difficult to setup the big expected json in test as it is in the same line.
Is there a way in Java 13 to skip the newline while writing the json.

Expected input


Expected output


Please log in or register to answer this question.

Welcome to Codingeek Q&A, where you can ask questions and receive answers from other members of the community.