Package proto3-json-serializer (0.1.8)

Interfaces

JSONObject

Functions

fromProto3JSON(type, json)

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

toProto3JSON(obj)

export declare function toProto3JSON(obj: protobuf.Message): JSONValue;
Parameter
NameDescription
objprotobuf.Message
Returns
TypeDescription
JSONValue

Type Aliases

JSONValue

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