Json tag in golang

type Dummy struct {
   Name    string  `json:"name,omitempty"`   Number  int64   `json:"number,omitempty"`   Pointer *string `json:"pointer,omitempty"`   xxx string `json:"-"`  // ignore this field   yyy string `json:"-,"`  // print this field with named -}

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch