0
Java로 무언가를 작성했습니다. JSON 객체를 반환하는 dropwizard 리소스가 있습니다. 그러나 잘못된 줄 바꿈 문자가 나타납니다.브레이크 라인 문자가없는 JSON Java
콘솔의 올바른 출력은 다음과 같습니다
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCx2xrZr5LU8zZw
owT+fK6vDl+EApHANgZcD9NDa1mzxEWAGAsbaaVe0488p52lOPtbkVFEZ5fNMsv+
Zj2jVgWy9plLuLJkdis3lva0qzFFVElspaCT2xxAdQqsNfmmuM6miTvzIGodWbCF
5toUU+R29QRKvJ9hSh276mt0hAuV3WKl2Oqwofqq9KwN2M8rPCuHdQ61pGx/Rfbm
q7qMqCZ5Bs6vWAKNBUc84kSJAZY4ECeaFbNJKMJ9HKqmadEM2X7gHIFaSDDgoVvw
Ym0RMPh0oDI1snALSdRyxRvwFE8PwHFeFrgYe0jSTI5ZEev+Z3nWKhAGYXqKRrmg
sjifYt1jAgMBAAECggEAQvuLzzQqjnzSofUjaly2xUMagfMdxVATcRScsiV58RQY
QLfNZxOQrnfq2CMgYhtlvwSpoKOLLkLVRQhoal15Y/8vmK8EsIU4nYUDgOOAeOXX
iU2Pfl/k8fmifV0OmtW7Lkk9BMHOdSNUMfnRZBp8TrjUVvlW5SMus5kDwyv/2P6Y
SMp5KuimdkSOl4fe37uqCWgeCBLyywd2Xh7PvRattJ/7GaDXsYCFWhyURMADYVpT
cUs0wl761ZHW7izxhuuZ8plqWIcq7ljZzXGYrGICmtfgVOrEKi0kRix8QH9tvl4N
ZtbFcwOBjOzWl0gQyVKTPp00CiUJ5YfWgpYbBiz2IQKBgQDpjOzVy+NlCbCxQEA7
1Bc5lXLPrs+IJgnZsg0eJwzbnkrMCwgohVDdUMVTq177FDAgvPfVZRYLPpJsNrHz
i/QdArz/t6hD+SiAZzH5CZnJezfyhlA9qXQa+fUbpmR54mya2YHt8iC6v7ArFgB2
lgV4aoeV4FYTbXy305rPXfCOSQKBgQDC863Zt7twHZKsSWP8VEatUERsySETQCxw
H4LGLRNEQ94YZ/1HA8gsfkEX7vQQ2O46ZTstYsIyRTu5It0P5En11CC/FEO+y612
YsHTM+RxsspFpq42OxJf+CFlR4204YgSylH9zeRZwJCcOS/zjrlfcKZpZPMR3rno
zOX7ide+SwKBgAvvRKcEPUGLhjj4lI+6Hdm2dmCAiWBmuTgjriHtUu3iH+ZfZfJU
Jba5iuvkpPzlojP6FBwWh1LZxre678sHStk0q53Rr8qRb+1n2JjmUbKHFmvRS0Zr
Y2CBh3H7RcUoue4L0WTsa5m/c+wvuqRUtEDcCMOy7BMgFDB8oruYDFPpAoGAbcQO
Stusab/86YyZA2XgNY1QOYA1Y0Vqv+a+Fx8iDfm4fz1t2iJC/upHdFZSjXnXCIIf
A7rrZKqeqer7VQtQqV064ttiGXdMv69zOpupMGtegEENLfOssORgyUm0e/fQSeQo
riLTQ8Wspol8ekIOFbKzv/va8GDbhDx58Vr3YmkCgYBB91nEmdSRazrctL/cij1A
02HoifuCER2PKmy14Wz4oGGaze7SmTlRqGGOPvXSA7OU1/cMY2FXH+lQy4fviiaJ
JTagv9tqNrrrLBzSP1Hy+0tVtF6wMuDRIhSVJ16sUhjlpVsvLaCiVw31Fj11MC6f
WblhhToH2uNywGYc8LMReg==
-----END PRIVATE KEY-----
브라우저에서 출력을하지만, 이런 식으로.
"-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCx2xrZr5LU8zZw\nowT+fK6vDl+EApHANgZcD9NDa1mzxEWAGAsbaaVe0488p52lOPtbkVFEZ5fNMsv+\nZj2jVgWy9plLuLJkdis3lva0qzFFVElspaCT2xxAdQqsNfmmuM6miTvzIGodWbCF\n5toUU+R29QRKvJ9hSh276mt0hAuV3WKl2Oqwofqq9KwN2M8rPCuHdQ61pGx/Rfbm\nq7qMqCZ5Bs6vWAKNBUc84kSJAZY4ECeaFbNJKMJ9HK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\nA7rrZKqeqer7VQtQqV064ttiGXdMv69zOpupMGtegEENLfOssORgyUm0e/fQSeQo\nriLTQ8Wspol8ekIOFbKzv/va8GDbhDx58Vr3YmkCgYBB91nEmdSRazrctL/cij1A\n02HoifuCER2PKmy14Wz4oGGaze7SmTlRqGGOPvXSA7OU1/cMY2FXH+lQy4fviiaJ\nJTagv9tqNrrrLBzSP1Hy+0tVtF6wMuDRIhSVJ16sUhjlpVsvLaCiVw31Fj11MC6f\nWblhhToH2uNywGYc8LMReg==\n-----END PRIVATE KEY-----\n"
누구든지 sign \ n 문자를 사용할 수 있습니까? 미리 감사드립니다.
브라우저보기는 테스트를위한 것입니다 브라우저에서 응답을보고 싶다면
, 당신은 텍스트 (텍스트/일반 및 JSON에 싸여 있지 콘텐츠 형식)와 같은 인증서 내용을 반환 할 수있다. 결국 Java 클라이언트는 JSON 패킷을 수신해야합니다. 그럼 지금 아무 문제없이 구현할 수 있습니다. 대단히 감사합니다. –