42namespace nfx::serialization::json
Generic document abstraction for JSON serialization.
Generic JSON document abstraction for serialization.
SchemaGenerator(const std::vector< Document > &documents)
Generate JSON Schema from multiple sample documents.
SchemaGenerator(const Document &document)
Generate JSON Schema from a single document.
SchemaGenerator(const std::vector< Document > &documents, const Options &options)
Generate JSON Schema from multiple sample documents.
SchemaGenerator(const SchemaGenerator &)=default
Copy constructor.
SchemaGenerator(SchemaGenerator &&) noexcept=default
Move constructor.
SchemaGenerator(const Document &document, const Options &options)
Generate JSON Schema from a single document.
const Document & schema() const noexcept
Get the generated schema.
Configuration options for schema generation.
bool detectEnums
Detect limited value sets as enums - requires multi-sample.
bool inferFormats
Detect string formats (email, date, URI, UUID, etc.).
std::string description
Schema description (optional).
std::string title
Schema title (optional).
bool inferConstraints
Generate constraints (minLength, minimum, etc.) - requires multi-sample.
size_t enumThreshold
Maximum unique values to consider as enum.