Drake
Drake C++ Documentation
yaml_io.h File Reference
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include "drake/common/yaml/yaml_io_options.h"
#include "drake/common/yaml/yaml_read_archive.h"
#include "drake/common/yaml/yaml_write_archive.h"
Include dependency graph for yaml_io.h:

Namespaces

 drake
 
 drake::yaml
 

Functions

template<typename Serializable >
static Serializable LoadYamlFile (const std::string &filename, const std::optional< std::string > &child_name=std::nullopt, const std::optional< Serializable > &defaults=std::nullopt, const std::optional< LoadYamlOptions > &options=std::nullopt)
 Loads data from a YAML-formatted file. More...
 
template<typename Serializable >
static Serializable LoadYamlString (const std::string &data, const std::optional< std::string > &child_name=std::nullopt, const std::optional< Serializable > &defaults=std::nullopt, const std::optional< LoadYamlOptions > &options=std::nullopt)
 Loads data from a YAML-formatted string. More...
 
template<typename Serializable >
void SaveYamlFile (const std::string &filename, const Serializable &data, const std::optional< std::string > &child_name=std::nullopt, const std::optional< Serializable > &defaults=std::nullopt)
 Saves data as a YAML-formatted file. More...
 
template<typename Serializable >
std::string SaveYamlString (const Serializable &data, const std::optional< std::string > &child_name=std::nullopt, const std::optional< Serializable > &defaults=std::nullopt)
 Saves data as a YAML-formatted string. More...
 
template<typename Serializable >
void SaveJsonFile (const std::string &filename, const Serializable &data)
 Saves data as a JSON-formatted file. More...
 
template<typename Serializable >
std::string SaveJsonString (const Serializable &data)
 Saves data as a JSON-formatted string. More...