1#ifndef SOURCEMETA_CORE_JSONL_H_
2#define SOURCEMETA_CORE_JSONL_H_
4#ifndef SOURCEMETA_CORE_JSONL_EXPORT
5#include <sourcemeta/core/jsonl_export.h>
8#include <sourcemeta/core/json.h>
11#include <sourcemeta/core/jsonl_iterator.h>
59namespace sourcemeta::core {
63class SOURCEMETA_CORE_JSONL_EXPORT
JSONL {
66 enum class Mode : std::uint8_t {
116 JSONL(std::basic_istream<JSON::Char, JSON::CharTraits> &input,
121 auto operator=(
const JSONL &) ->
JSONL & =
delete;
126 auto begin() -> const_iterator;
127 auto end() -> const_iterator;
128 auto cbegin() -> const_iterator;
129 auto cend() -> const_iterator;
137#pragma warning(disable : 4251)
139 std::basic_istream<JSON::Char, JSON::CharTraits> *stream_;
142 std::unique_ptr<Internal> internal_;
@ GZIP
The gzip coding per RFC 9110 ยง8.4.1.3.
Definition http.h:57
Mode
The mode of operation for the JSONL parser.
Definition jsonl.h:66
@ Raw
The input stream contains raw JSONL text.
Definition jsonl.h:68
JSONL(std::basic_istream< JSON::Char, JSON::CharTraits > &input, Mode mode=Mode::Raw, JSONLFraming framing=JSONLFraming::LineFeed)
JSONLFraming
Definition jsonl_iterator.h:20
@ LineFeed
Every value is terminated by a line feed, as in JSON Lines and NDJSON.
Definition jsonl_iterator.h:22