Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Support custom struct field tag name in marshal? #146

@davyxu

Description

@davyxu

Like:

type UserProfile struct{

   OnlineData int   `mem: onlinedata`  // this field is memory data, also use json
   DBData int   `db: onlinedata`

}

json.Marshal( &UserProfile{ ... some data }, "mem" ) // use mem tag to marshal
json.Marshal( &UserProfile{ ... some data }, "db" ) // use db tag to marshal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions