1#ifndef SOURCEMETA_CORE_YAML_H_
2#define SOURCEMETA_CORE_YAML_H_
4#ifndef SOURCEMETA_CORE_YAML_EXPORT
5#include <sourcemeta/core/yaml_export.h>
8#include <sourcemeta/core/json.h>
11#include <sourcemeta/core/yaml_error.h>
12#include <sourcemeta/core/yaml_roundtrip.h>
28namespace sourcemeta::core {
46SOURCEMETA_CORE_YAML_EXPORT
47auto parse_yaml(std::basic_istream<JSON::Char, JSON::CharTraits> &stream)
68SOURCEMETA_CORE_YAML_EXPORT
90SOURCEMETA_CORE_YAML_EXPORT
100SOURCEMETA_CORE_YAML_EXPORT
101auto parse_yaml(std::basic_istream<JSON::Char, JSON::CharTraits> &stream,
110SOURCEMETA_CORE_YAML_EXPORT
120SOURCEMETA_CORE_YAML_EXPORT
142SOURCEMETA_CORE_YAML_EXPORT
152SOURCEMETA_CORE_YAML_EXPORT
170SOURCEMETA_CORE_YAML_EXPORT
180SOURCEMETA_CORE_YAML_EXPORT
204SOURCEMETA_CORE_YAML_EXPORT
206 std::basic_ostream<JSON::Char, JSON::CharTraits> &stream,
223SOURCEMETA_CORE_YAML_EXPORT
225 std::basic_ostream<JSON::Char, JSON::CharTraits> &stream)
std::function< void( const ParsePhase phase, const Type type, const std::uint64_t line, const std::uint64_t column, const ParseContext context, const std::size_t index, const String &property)> ParseCallback
Definition json_value.h:103
std::basic_string< Char, CharTraits, Allocator< Char > > String
The string type used by the JSON document.
Definition json_value.h:52
SOURCEMETA_CORE_YAML_EXPORT auto stringify_yaml(const JSON &document, std::basic_ostream< JSON::Char, JSON::CharTraits > &stream, const YAMLRoundTrip &roundtrip) -> void
SOURCEMETA_CORE_YAML_EXPORT auto parse_yaml(std::basic_istream< JSON::Char, JSON::CharTraits > &stream) -> JSON
SOURCEMETA_CORE_YAML_EXPORT auto read_yaml(const std::filesystem::path &path) -> JSON
SOURCEMETA_CORE_YAML_EXPORT auto read_yaml_or_json(const std::filesystem::path &path) -> JSON