inblog logo
|
Coding's note
    HTTP

    VS Code, json, 기초

    이소연's avatar
    이소연
    Aug 05, 2024
    VS Code, json, 기초
    Contents
    제이슨비주얼 스튜디오
    프로토콜
    단체끼리 협의
     
    많이 모이면 인터페이스처럼 됨. 니가 따라와 rfc6838
     
    확장자, 마임타입
     
    html → http : 동영상, 파일, guf?
    약속) jpeg 파일
    바디 데이터
    헤더?
     
    메모장에 제이피지 해도 못알아들어 jpg해도
    그래서 정확히 정해야 해.
     
    if
    마임타입
    http 바디가 있어야 함.
     
    대제목/소제목 : text/plain : 일반 평문. 그냥 글자..
    text/html
    image/jpeg
    image/png 등 정확하게 해야 컴퓨터가 파싱이 가능.
    인간은 살짝 틀려도 알지만.
     
    기억하자요
    💡
    application/json
    application/x-www-form-urlencoded
    text/html
    text/plain
     
    타입
     
    notion image
    notion image
    json : 키값””
    키에 “” 안 붙임. 자바스크립트는..
     
    컴퓨터 파싱 구문분석
    찾지 못한다고.object로 못찾음 .으로 못찾음
    string이면 못 찾음. split해서 다 쪼개서 찾아야 함?
     
    통신은 문자로 내려감. 모든 건 문자로 감. false, 도 문자
     
    let user={ }
     
    문제
    1. 문자열→ 오브젝트로 바꿔야 함.
    1. 다른 프로그램끼리 통신
      1. 서로 이해하지 못함. 내가 보낸 데이터를 다른 프로그램 이해 못함.→ 그걸 해결해주는 것이 json
     
    오브젝트렉터
    빈생성자를 통해? 직접적으로 접근해서 값을 넣어준다고??
    json →java로 바꿀 때는 빈 생성자가 필요함.
    -reflection 기술은 나중에 배움.
     
    여기서는
    이거는 상태 값이 아니라 데이터를 담는 바구니라고 생각
    notion image
    notion image
    제이슨,{ }: 오브젝트
    4개를 담을 수 있는 것, 파싱도 되야함 :so class.
     
     
    💡
    ctrl alt L : 줄 맞춤
     
    lombok 세팅
    notion image
    notion image
    notion image
    package com.metacoding.myhttp; public class Post { private int userId; private int id; private String title; private String body; //값 받는 바구니 public Post() { }//objectMapper땜시 public Post(int userId, int id, String title, String body) { this.userId = userId; this.id = id; this.title = title; this.body = body; } //기본, 생성자는 기본이니까 생략 가능. public int getUserId() { return userId; } public int getId() { return id; } public String getTitle() { return title; } public String getBody() { return body; } }
    notion image
    notion image
    모든 생성자 다 받는? ALL~~
     
    notion image
     

    제이슨

    Why use?
    프랑스 인 영국인
    class User { int id = 1; String username = "ssar"; } //위의 자료를 표현하려면 <user> // xml방식? 인데 그러면 <user>는 6byte need, // < 하나하나 다 byte 차지 <id>1</id> <username>"ssar"</username> </user> {//제이슨으로 쓰면 아래와 같이 씀, 훨씬 용량 적게 차지 "id":1, "username":"ssar" } //제이슨으로 공용어를 씀(가볍고 모든 언어 표현가능해서)
     

    비주얼 스튜디오

    대문자를 쓰지 않는다
    notion image
    notion image
    브라우져 뷰어가 중요
    notion image
    notion image
     
    태그
    1. span- 인라인(inline) 속성 : 자기 크기만큼만 잡음
    notion image
    1. div-block 속성 : 행을 통째로 잡음
    notion image
     
    태그-v
    소스를 못찾으면 대체할 것
    notion image
    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <img src="https://i.namu.wiki/i/yaJpstKfFhhpZhZj4vy7es8sq7TjmR2YfIbeq82PMPH-Oje8vkFK5sEHpLV4JTrEMjgtJubRSp70Cb1psIfffMgCg7JaH-EvoCxMFiS0MA0fV6QoxuxbPSIPgBbk5UPCx6aYVGb9jyrqEL4sXZucrw.webp"> </body> </html>
     
    하이퍼 클릭하면 해당 페이지
     
    span, idri?
    마크업…
    notion image
    하이퍼링크
     
    검사하셈
    notion image
     
    git push commit 하면서 ~~ 하세요
     
    shift + alt +키보드 방향 아래 : 복사
     
     
     
    Share article
    Contents
    제이슨비주얼 스튜디오

    Coding's note

    RSS·Powered by Inblog