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>
30namespace sourcemeta::core {
48SOURCEMETA_CORE_YAML_EXPORT
49auto parse_yaml(std::basic_istream<JSON::Char, JSON::CharTraits> &stream)
70SOURCEMETA_CORE_YAML_EXPORT
92SOURCEMETA_CORE_YAML_EXPORT
102SOURCEMETA_CORE_YAML_EXPORT
103auto parse_yaml(std::basic_istream<JSON::Char, JSON::CharTraits> &stream,
112SOURCEMETA_CORE_YAML_EXPORT
122SOURCEMETA_CORE_YAML_EXPORT
144SOURCEMETA_CORE_YAML_EXPORT
154SOURCEMETA_CORE_YAML_EXPORT
172SOURCEMETA_CORE_YAML_EXPORT
196SOURCEMETA_CORE_YAML_EXPORT
197auto parse_yaml(std::basic_istream<JSON::Char, JSON::CharTraits> &stream,
207SOURCEMETA_CORE_YAML_EXPORT
220SOURCEMETA_CORE_YAML_EXPORT
221auto parse_yaml(std::basic_istream<JSON::Char, JSON::CharTraits> &stream,
245SOURCEMETA_CORE_YAML_EXPORT
258SOURCEMETA_CORE_YAML_EXPORT
287SOURCEMETA_CORE_YAML_EXPORT
289 std::basic_ostream<JSON::Char, JSON::CharTraits> &stream,
291 const std::optional<std::size_t> indentation = std::nullopt)
310SOURCEMETA_CORE_YAML_EXPORT
312 std::basic_ostream<JSON::Char, JSON::CharTraits> &stream,
313 const std::size_t indentation = 2) -> void;
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 parse_yaml(std::basic_istream< JSON::Char, JSON::CharTraits > &stream) -> JSON
SOURCEMETA_CORE_YAML_EXPORT auto stringify_yaml(const JSON &document, std::basic_ostream< JSON::Char, JSON::CharTraits > &stream, const YAMLRoundTrip &roundtrip, const std::optional< std::size_t > indentation=std::nullopt) -> void
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