Comments (3)
this is the expected behaviour;
the documentation clearly says value must be raw json value
i.e it must be string, boolean, number, map, array and composite of these.
in your case yaml unmarshalled it into time.Time
. you unmarshal that value into string.
from jsonschema.
There's actually no way to control this behavior. It is the default behavior of the YAML unmarshaler when unmarshaling to any
. Please reopen and consider a fix.
from jsonschema.
if you have used quotes around the value then it will get converted into string:
yamlString := `date: "2025-01-01"`
from jsonschema.
Related Issues (20)
- Unnecessary `toStringKeys` when using `yaml.v3` HOT 5
- Is Custom format checkers supported? HOT 4
- Support for HTTP references HOT 3
- Add `Draft` to type `Schema` HOT 8
- Add warnings on json schema deprecated fields HOT 1
- Array of oneOfs with required fields fails validation HOT 4
- Draft 2020-12 and array's "items" HOT 2
- Can add `Loader` , give schema and `[]byte` , parse to `map` or `struct` ? HOT 1
- pre-commit hook HOT 3
- request: validate examples HOT 1
- Can not install v5.2.0 HOT 7
- False positive error for a valid regex pattern HOT 1
- Compiler short circuits when validating schemas, not providing the full list of errors
- Extension.Validate provides data in inconsistent order HOT 1
- Cannot override jsonschema.Formats HOT 4
- format not validated HOT 3
- Feature: marshal a default payload based on jsonSchema HOT 1
- Custom error message HOT 9
- About using jsonschema.CompileString HOT 2
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 jsonschema.