Skip to content

dx suggestion #683

Open
Open
@jpillora

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)

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