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.

[BUG]use ".MarshalIndent" panic #704

Description

@wubie052

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions