json#
마샬링 (Marshaling)#
- 인코딩 (Encoding) / 직렬화 (Serialization)
- Go 데이터 -> JSON
- Python의
json.dumps()와 유사하다.
func Marshal(v any) ([]byte, error)
func (enc *Encoder) Encode(v any) error언마샬링 (Unmarshaling)#
- 디코딩 (Decoding) / 역직렬화 (Deserialization)
- JSON -> Go 데이터
- Python의
json.loads()와 유사하다.
func Unmarshal(data []byte, v any) error
func (dec *Decoder) Decode(v any) error