Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
schema_json.hpp File Reference
#include <pulp/runtime/result.hpp>
#include <pulp/timeline/model.hpp>
#include <pulp/timeline/utf8.hpp>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  pulp::timeline::PersistenceError
 Structured persistence failure. More...
struct  pulp::timeline::DecodeLimits
 Parser, migration, opaque-payload, and Timeline structure quotas. More...
struct  pulp::timeline::JsonValue
 Owning JSON DOM node with source byte bounds. More...
struct  pulp::timeline::JsonObjectMember
 Pair-like owning member of a JSON object. More...
class  pulp::timeline::ParsedJson
 Parsed JSON tree that owns the source bytes referenced by node offsets. More...
struct  pulp::timeline::StructuralPreflightSuccess
 Empty success value returned by structural preflight. More...

Namespaces

namespace  pulp
namespace  pulp::timeline

Enumerations

enum class  pulp::timeline::PersistenceErrorCode : std::uint8_t {
  pulp::timeline::PersistenceErrorCode::InvalidJson , pulp::timeline::PersistenceErrorCode::InvalidUtf8 , pulp::timeline::PersistenceErrorCode::DuplicateKey , pulp::timeline::PersistenceErrorCode::LimitExceeded ,
  pulp::timeline::PersistenceErrorCode::MissingField , pulp::timeline::PersistenceErrorCode::UnexpectedType , pulp::timeline::PersistenceErrorCode::InvalidNumber , pulp::timeline::PersistenceErrorCode::InvalidSchema ,
  pulp::timeline::PersistenceErrorCode::UnsupportedStructuralType , pulp::timeline::PersistenceErrorCode::UnsupportedSchemaVersion , pulp::timeline::PersistenceErrorCode::MigrationPathMissing , pulp::timeline::PersistenceErrorCode::MigrationFailed ,
  pulp::timeline::PersistenceErrorCode::ModelRejected , pulp::timeline::PersistenceErrorCode::OutputLimitExceeded
}
 Stable category for a JSON, schema, quota, migration, or model rejection. More...

Functions

runtime::Result< std::shared_ptr< const ParsedJson >, PersistenceError > pulp::timeline::parse_json (std::string_view json, const DecodeLimits &limits={})
 Parses one complete UTF-8 JSON value into an owning immutable document.
runtime::Result< const JsonValue *, PersistenceError > pulp::timeline::validate_exact_envelope (const JsonValue &value, std::string_view expected_type, std::uint32_t expected_version, std::string path={}, PersistenceErrorCode failure_code=PersistenceErrorCode::InvalidSchema)
 Validates an exact extension or migration envelope.
runtime::Result< StructuralPreflightSuccess, PersistenceError > pulp::timeline::preflight_timeline_structure (std::string_view json, const DecodeLimits &limits)
 Performs an allocation-light, schema-aware Timeline quota scan.
runtime::Result< std::string, PersistenceError > pulp::timeline::canonicalize_json (const JsonValue &value)
 Serializes a DOM value as deterministic JSON with sorted object keys.
std::string pulp::timeline::quote_json_string (std::string_view value)
 Quotes and escapes a byte sequence as a JSON string token.
runtime::Result< std::uint64_t, PersistenceError > pulp::timeline::parse_canonical_u64_string (const JsonValue &value, std::string path={})
 Parses a canonical decimal unsigned integer stored as a JSON string.
runtime::Result< std::int64_t, PersistenceError > pulp::timeline::parse_canonical_i64_string (const JsonValue &value, std::string path={})
 Parses a canonical decimal signed integer stored as a JSON string.
runtime::Result< std::uint32_t, PersistenceError > pulp::timeline::parse_u32_number (const JsonValue &value, std::string path={})
 Parses an integral JSON number representable as uint32_t.