dpp::json_interface
json_interface.h
typename T
typename U T
typename decltype(std::declval<U&>().to_json_impl(bool{}))
std::string std::string dpp::json_interface< T >::build_json (bool with_id=false) const build_json dpp::json_interface::build_json bool with_id false

Convert object to json string.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

std::string Json built from the structure

typename U T
typename decltype(std::declval<U&>().fill_from_json_impl(std::declval<nlohmann::json*>()))
T & T & dpp::json_interface< T >::fill_from_json (nlohmann::json *j) fill_from_json dpp::json_interface::fill_from_json nlohmann::json * j

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

typename U T
typename decltype(std::declval<U&>().to_json_impl(bool{}))
auto auto dpp::json_interface< T >::to_json (bool with_id=false) const to_json dpp::json_interface::to_json bool with_id false

Convert object to nlohmann::json.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

json Json built from the structure

Represents an interface for an object that can optionally implement functions for converting to and from nlohmann::json. The methods are only present if the actual object also has those methods.

T

Type of class that implements the interface

dpp::application
dpp::application_role_connection
dpp::application_role_connection_metadata
dpp::audit_entry
dpp::auditlog
dpp::automod_action
dpp::automod_metadata
dpp::automod_rule
dpp::ban
dpp::channel
dpp::command_option
dpp::command_option_choice
dpp::command_permission
dpp::component
dpp::connection
dpp::dtemplate
dpp::emoji
dpp::entitlement
dpp::forum_tag
dpp::gateway
dpp::guild
dpp::guild_command_permissions
dpp::guild_member
dpp::guild_widget
dpp::integration
dpp::interaction
dpp::interaction_modal_response
dpp::interaction_response
dpp::invite
dpp::json_interface< T >
dpp::json_interface< application >
< application >
dpp::json_interface< application_role_connection >
< application_role_connection >
dpp::json_interface< application_role_connection_metadata >
< application_role_connection_metadata >
dpp::json_interface< audit_entry >
< audit_entry >
dpp::json_interface< auditlog >
< auditlog >
dpp::json_interface< automod_action >
< automod_action >
dpp::json_interface< automod_metadata >
< automod_metadata >
dpp::json_interface< automod_rule >
< automod_rule >
dpp::json_interface< ban >
< ban >
dpp::json_interface< channel >
< channel >
dpp::json_interface< command_option >
< command_option >
dpp::json_interface< command_option_choice >
< command_option_choice >
dpp::json_interface< command_permission >
< command_permission >
dpp::json_interface< component >
< component >
dpp::json_interface< connection >
< connection >
dpp::json_interface< dtemplate >
< dtemplate >
dpp::json_interface< emoji >
< emoji >
dpp::json_interface< entitlement >
< entitlement >
dpp::json_interface< forum_tag >
< forum_tag >
dpp::json_interface< gateway >
< gateway >
dpp::json_interface< guild >
< guild >
dpp::json_interface< guild_command_permissions >
< guild_command_permissions >
dpp::json_interface< guild_member >
< guild_member >
dpp::json_interface< guild_widget >
< guild_widget >
dpp::json_interface< integration >
< integration >
dpp::json_interface< interaction >
< interaction >
dpp::json_interface< interaction_modal_response >
< interaction_modal_response >
dpp::json_interface< interaction_response >
< interaction_response >
dpp::json_interface< invite >
< invite >
dpp::json_interface< message >
< message >
dpp::json_interface< message_pin >
< message_pin >
dpp::json_interface< message_search_result >
< message_search_result >
dpp::json_interface< onboarding >
< onboarding >
dpp::json_interface< onboarding_prompt >
< onboarding_prompt >
dpp::json_interface< onboarding_prompt_option >
< onboarding_prompt_option >
dpp::json_interface< presence >
< presence >
dpp::json_interface< prune >
< prune >
dpp::json_interface< role >
< role >
dpp::json_interface< scheduled_event >
< scheduled_event >
dpp::json_interface< select_option >
< select_option >
dpp::json_interface< sku >
< sku >
dpp::json_interface< slashcommand >
< slashcommand >
dpp::json_interface< stage_instance >
< stage_instance >
dpp::json_interface< sticker >
< sticker >
dpp::json_interface< sticker_pack >
< sticker_pack >
dpp::json_interface< thread >
< thread >
dpp::json_interface< thread_member >
< thread_member >
dpp::json_interface< user >
< user >
dpp::json_interface< user_identified >
< user_identified >
dpp::json_interface< voice_channel_effect >
< voice_channel_effect >
dpp::json_interface< voiceregion >
< voiceregion >
dpp::json_interface< voicestate >
< voicestate >
dpp::json_interface< webhook >
< webhook >
dpp::json_interface< welcome_channel >
< welcome_channel >
dpp::json_interface< welcome_screen >
< welcome_screen >
dpp::message
dpp::message_pin
dpp::message_search_result
dpp::onboarding
dpp::onboarding_prompt
dpp::onboarding_prompt_option
dpp::presence
dpp::prune
dpp::role
dpp::scheduled_event
dpp::select_option
dpp::sku
dpp::slashcommand
dpp::stage_instance
dpp::sticker
dpp::sticker_pack
dpp::thread
dpp::thread_member
dpp::user
dpp::user_identified
dpp::voice_channel_effect
dpp::voiceregion
dpp::voicestate
dpp::webhook
dpp::welcome_channel
dpp::welcome_screen
- dpp::json_interface
  build_json
- dpp::json_interface
  fill_from_json
- dpp::json_interface
  to_json