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. | |
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.
|
strong |
|
noexcept |
Finds an exact member on an object.
| key | Decoded member name. |
| std::vector<JsonValue> pulp::timeline::JsonValue::array |
Child values when kind is Array.
| std::size_t pulp::timeline::JsonValue::begin = 0 |
Inclusive source byte offset.
| bool pulp::timeline::JsonValue::boolean = false |
Boolean payload when kind is Boolean.
| std::size_t pulp::timeline::JsonValue::end = 0 |
Exclusive source byte offset.
| Kind pulp::timeline::JsonValue::kind = Kind::Null |
Value category.
| std::vector<JsonObjectMember> pulp::timeline::JsonValue::object |
Decoded key/value pairs when kind is Object.
| std::string pulp::timeline::JsonValue::scalar |
Decoded string or original number spelling.