djp

package module
v0.0.0-...-33cf604 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

README

Discord JSON Parser (jdp)

Discord JSON Parser is tool to manipulate raw discord json data before unmarshalling. This is to avoid unecessary heap allocations for very large objects.

This project was first written as an internal component of Disgord such that different cache repositories (user, guild, channels, etc.) could run in parallel on incoming discord events, by reading a shared byte slice.

Note

Custom fields will be prefixed by underscore.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MemberReplaceUserWithID

func MemberReplaceUserWithID(data []byte, keys ...string) []byte

MemberReplaceUserWithID For a slice of members, the user struct is simply replaced with `"_id":$snowflake`, where $snowflake is the user_id. Note the prefix is underscore to signify custom field.

Types

This section is empty.

Jump to

Keyboard shortcuts

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