Test newline escaped character when serializing data