JSON (2) 썸네일형 리스트형 반응형 ㅜ [C#] Json Text 를 Json Format 으로 변경 역시 우리의 구글님은 날 실망 시키지 않으신다. ㅎㅎ 아래의 Method를 이용해서 json을 string으로 주면 Formatting 되어 반환 해 준다. public string ChageJsonStringToJsonFomat(string json) { int indentation = 0; int quoteCount = 0; var result = from ch in json let quotes = ch == '"' ? quoteCount++ : quoteCount let lineBreak = ch == ',' && quotes % 2 == 0 ? ch + Environment.NewLine + String.Concat(Enumerable.Repeat(INDENT_STRING, indentation).. json를 Controller에서 string으로 확인 코드는 Controller에서 직접 json DATA를 string으로 변환 한다. var resolveRequest = HttpContext.Request; resolveRequest.InputStream.Seek(0, SeekOrigin.Begin); string jsonString = new StreamReader(resolveRequest.InputStream).ReadToEnd(); 이전 1 다음