Skip to content

[BUG]use ".MarshalIndent" panic #704

Open
@Tiper-In-Github

Description

@Tiper-In-Github

The following code runs fine in the original package, but panics after replacing it with jsoniter:

func() {
  // resp is the structure generated by protobuf
  // Return json when requested in Hex
  if byteRes, err := jsoniter.MarshalIndent(resp, "", "\t"); err == nil {
	  c.Writer.Write(byteRes)
  }
}

More details

  • go:1.22.5
  • jsoniter:v1.1.12
  • Protobuf:use

proto:
pkg: google.golang.org/protobuf
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2

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