Package proto3-json-serializer (2.0.1)

Interfaces

JSONObject

ToProto3JSONOptions

Functions

fromProto3JSON(type, json)

export declare function fromProto3JSON(type: protobuf.Type, json: JSONValue): protobuf.Message<{}> | null;
Parameters
NameDescription
typeprotobuf.Type
jsonJSONValue
Returns
TypeDescription
Message<{}> | null

toProto3JSON(obj, options)

export declare function toProto3JSON(obj: protobuf.Message, options?: ToProto3JSONOptions): JSONValue;
Parameters
NameDescription
objprotobuf.Message
optionsToProto3JSONOptions
Returns
TypeDescription
JSONValue

Type Aliases

JSONValue

export type JSONValue = string | number | boolean | null | JSONValue[] | {
    [key: string]: JSONValue;
};