json

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	Parser               ProtoParser
	Filename             string
	Package, MessageType string
	Indent               bool
}

Converter converts proto message to json using definition provided by ProtoParser.

func (Converter) Convert

func (c Converter) Convert(r io.Reader) ([]byte, error)

Convert converts proto message to json.

type ProtoParser

type ProtoParser interface {
	ParseFiles(filenames ...string) ([]*desc.FileDescriptor, error)
}

ProtoParser defines the interface for parsing proto files dynamically.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL