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.

dx suggestion #683

Open
Open

Description

@jpillora
  • make a json subdirectory
  • make a file with:
package json

import jsoniter "github.com/json-iterator/go"

var json = jsoniter.ConfigCompatibleWithStandardLibrary

func Marshal(v any) (b []byte, error) {
   return json.Marshal(v)
}

func Unmarshal(b []byte, v any) error {
   return json.Unmarshal(b, v)
}
  • change README standard library replace usage from
import jsoniter "github.com/json-iterator/go"

var json = jsoniter.ConfigCompatibleWithStandardLibrary
json.Unmarshal(input, &data)
  • to
import "github.com/json-iterator/go/json"

json.Unmarshal(input, &data)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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