Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline::JsonValue Struct Reference

Owning JSON DOM node with source byte bounds. More...

#include <schema_json.hpp>

Public Types

enum class  Kind : std::uint8_t {
  Null , Boolean , Number , String ,
  Array , Object
}
 JSON value category. More...

Public Member Functions

const JsonValue * find (std::string_view key) const noexcept
 Finds an exact member on an object.

Public Attributes

Kind kind = Kind::Null
 Value category.
bool boolean = false
 Boolean payload when kind is Boolean.
std::string scalar
 Decoded string or original number spelling.
std::vector< JsonValue > array
 Child values when kind is Array.
std::vector< JsonObjectMember > object
 Decoded key/value pairs when kind is Object.
std::size_t begin = 0
 Inclusive source byte offset.
std::size_t end = 0
 Exclusive source byte offset.

Detailed Description

Owning JSON DOM node with source byte bounds.

Strings and object keys are decoded UTF-8. Number preserves the lexical representation in scalar so canonical numeric validation remains explicit.

Member Enumeration Documentation

◆ Kind

enum class pulp::timeline::JsonValue::Kind : std::uint8_t
strong

JSON value category.

Enumerator
Null 

JSON null.

Boolean 

JSON true or false.

Number 

JSON number with its lexical spelling in scalar.

String 

Decoded JSON string in scalar.

Array 

Ordered child values in array.

Object 

Ordered decoded key/value pairs in object.

Member Function Documentation

◆ find()

const JsonValue * pulp::timeline::JsonValue::find ( std::string_view key) const
noexcept

Finds an exact member on an object.

Parameters
keyDecoded member name.
Returns
A pointer valid for this DOM's lifetime, or nullptr for a non-object or missing key.

Member Data Documentation

◆ array

std::vector<JsonValue> pulp::timeline::JsonValue::array

Child values when kind is Array.

◆ begin

std::size_t pulp::timeline::JsonValue::begin = 0

Inclusive source byte offset.

◆ boolean

bool pulp::timeline::JsonValue::boolean = false

Boolean payload when kind is Boolean.

◆ end

std::size_t pulp::timeline::JsonValue::end = 0

Exclusive source byte offset.

◆ kind

Kind pulp::timeline::JsonValue::kind = Kind::Null

Value category.

◆ object

std::vector<JsonObjectMember> pulp::timeline::JsonValue::object

Decoded key/value pairs when kind is Object.

◆ scalar

std::string pulp::timeline::JsonValue::scalar

Decoded string or original number spelling.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline/include/pulp/timeline/schema_json.hpp