본문 바로가기
728x90

JSON4

spring responsebody json 필드명 변경하기 memberId -> member_id 로 변경 public class LoginResultDto { @JsonProperty("member_id") Long memberId; String email; } 2022. 8. 2.
안드로이드 json 사용하기 JavaScript Object Notation의 약자로 JavaScript 언어에서 객체를 표현하는 문법을 사용해 데이터를 표현하는 비 표준 문서이다. 다양한 데이터 타입을 표현할 수 있어 많이 사용하는 문서 양식이다. package com.example.httpjson import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import kotlinx.android.synthetic.main.activity_main.* import org.json.JSONArray import java.io.BufferedReader import java.io.InputStreamReader import java.net.HttpURLConnec.. 2022. 6. 26.
스프링 API JSON 검증 컨트롤러 import hello.itemservice.web.validation.form.ItemSaveForm; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; impo.. 2021. 9. 29.
HTTP 요청 메시지 (JSON) import com.fasterxml.jackson.databind.ObjectMapper; import hello.springmvc.basic.HelloData; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpEntity; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.sp.. 2021. 9. 10.
728x90