nodejs-logging icon indicating copy to clipboard operation
nodejs-logging copied to clipboard

Feat: Marshall protoPayload into JSON format

Open 0xSage opened this issue 3 years ago • 0 comments

Inspired by #785 and #984:

Add protoPayload detection to fromApiResponse to automarshall proto into json format. Return an error or the original proto if marshalling fails. Protobufjs library can be used.

Such that when users call getEntries on audit logs that have protoPayloads, instead of text/JSON payloads, they get some structured payload information back. Some fields, nested fields, might still fail to marshal.

Similar to Go implementation.

This would be a breaking change.

0xSage avatar Feb 08 '21 22:02 0xSage