Comments (2)
We should be able to support both compile time and runtime validation. Initially validation should be based off of JSON schema.
from glaze.
There are two approaches to runtime validation. We can perform validation on parse, or we can perform validation on C++ memory. The later will be much more performant and I think should be the first focus of Glaze. We will use the same glz::json_schema, but we can use these structs at runtime to validate the memory of the C++ objects.
my_struct obj{};
if (glz::schema_validate(obj)) {
// true if the object matches the gz::json_schema
// note that we don't use a buffer, instead we would first read in a JSON file
// and then we would validate
}
from glaze.
Related Issues (20)
- Build and test for 32-bit in Actions
- std::pair arrays roundtrip
- `float` member issue with `clang++-15` and `g++-12` HOT 3
- `json_test.cpp(7840): warning C4267: '=': conversion from 'size_t' to 'uint16_t', possible loss of data` HOT 1
- glz::reader/glz::writer for incremental reading/writing HOT 5
- Partial read for BEVE
- glz::raw without quotes question HOT 1
- Binary serialization of hidden members HOT 2
- error: constructor priorities are not supported 3316 | const char* argv[]) HOT 3
- gcc and msvc compilation error with explicit constructors HOT 19
- Warnings & Errors in various configurations HOT 16
- rapidjson ĺŻšćŻ HOT 15
- How do I read an array of json objects in glaze? HOT 15
- field-based parse bifurcation HOT 1
- Add the library to nuget HOT 2
- Option to skip reading in null values
- calculate serialize size before serialization and serialize to pre-allocated memory HOT 4
- Option to use partial with char* or char[] HOT 3
- data_must_be_null_terminated issue HOT 1
- Raw char buffer handling HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glaze.