JSON Schema explained and validated in IntelliJ

  Рет қаралды 18,084

Mike Møller Nielsen

Mike Møller Nielsen

4 жыл бұрын

Get started with JSON schemas and see how to attach a json schema to a json data file in IntelliJ
Enjoy! :-)
Thank you for commenting and asking questions.
The code is located here:
github.com/ekim197711/json-sc...
Follow me on twitter:
/ mikemoelnielsen
Support me on Patreon:
/ mikemoellernielsen
As an Amazon Associate I earn from qualifying purchases.
Check out the stuff that I like (always updated):
kit.co/MikeMoelNielsen/cool-s...

Пікірлер: 58
@chanatillo
@chanatillo 3 жыл бұрын
years later and this tutorial is STILL amazing, thanks!
@MikesTechCorner
@MikesTechCorner Жыл бұрын
Thank you very much :)
@ThecrackpotdadPlus
@ThecrackpotdadPlus 3 жыл бұрын
Thank you, this has been really helpful. Brilliant.
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
Great to hear!
@tranquiloteov
@tranquiloteov 3 жыл бұрын
awsome tutorial. helped me a lot.
@velhobugado0230
@velhobugado0230 2 жыл бұрын
very well explanatory video, even without understanding almost anything in English, I managed to do it on the first attempt
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
I am happy to hear that.
@velhobugado0230
@velhobugado0230 2 жыл бұрын
@@MikesTechCorner I started a project and it already has more than 3k in lines xd
@runningfly21
@runningfly21 2 жыл бұрын
great tutorial! this was very helpful
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
I'm happy to hear that:)
@udaypratapsingh8419
@udaypratapsingh8419 3 жыл бұрын
So nicely explained
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
Thank you very much 🙂
@sps014
@sps014 3 жыл бұрын
Thank you so much , great explanation
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
Thanks for watching :)
@Shajinvk
@Shajinvk 3 жыл бұрын
Thank you Mike.
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
You are welcome. :-)
@josevelez7994
@josevelez7994 3 жыл бұрын
Very nice video. Thanks!
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
Thank you for watching. :-)
@srenh-p3798
@srenh-p3798 Жыл бұрын
God video, Mike!
@MikesTechCorner
@MikesTechCorner Жыл бұрын
Thank you Søren :)
@jongtorralba1599
@jongtorralba1599 2 жыл бұрын
lifesaver!,.. :) Thank you.
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
Glad it helped!
@voiceguy554
@voiceguy554 2 жыл бұрын
very well explained...thanks!
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
Glad it was helpful! Thank you for watching
@DenisKisina
@DenisKisina Жыл бұрын
Thanks for your video, it's very helpful.
@MikesTechCorner
@MikesTechCorner Жыл бұрын
You are welcome! Thx for commenting. :)
@DenisKisina
@DenisKisina Жыл бұрын
@@MikesTechCorner Just one question though, how would you detail with fields that are not in jsonschema or misspelled but not required?
@MikesTechCorner
@MikesTechCorner Жыл бұрын
@@DenisKisina I would see it as an error and the json parser so per default too. You can configure it to ignore unknown fields. With jackson it is an annotation on top of the class. But I think the right thing to do was to reject the json at communicate with the call about why they add the extra fields?. You are specifying your api and should accept garbage data.
@DenisKisina
@DenisKisina Жыл бұрын
@@MikesTechCorner I agree with your suggestion of handling and communicating the culprit fields.
@alexkhonko4115
@alexkhonko4115 Жыл бұрын
awesome. Thank you
@MikesTechCorner
@MikesTechCorner Жыл бұрын
You are welcome. Try my website for data conversion
@kumarharshit4365
@kumarharshit4365 3 жыл бұрын
Hi Mike Thanks for the video Can you please let us know how to validate a date using json schemas. For ex: if I want my date to be greater/lesser than a particular date. I am using ajv and there formatMinimum/formatMaximum are available but they seem to validate everything
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
I don't think you can do that. You have to check that in your program.
@agrajdahat7087
@agrajdahat7087 4 жыл бұрын
Hi, can you please explain how to implement Json Schema validation for multi module projects. I am currently using spring boot and Swagger.
@MikesTechCorner
@MikesTechCorner 4 жыл бұрын
Thats a great idea! Yes I have added it to my to do list
@agrajdahat7087
@agrajdahat7087 4 жыл бұрын
@@MikesTechCorner Thank you so much
@MonicaJeswanth
@MonicaJeswanth 3 жыл бұрын
Can we add dependencies for the checkboxes ?
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
Hmmm I don't understand? The JSON Schema is just a file
@kimberlyserrano894
@kimberlyserrano894 2 жыл бұрын
Hi mike, can you check why im being presented an error ( .detected is a required property, . Repeat_incident is a required property) for this required properties. It is working as intended though "required": [ "detected", "repeat_incident" ], "dependencies": { "detected": { "oneOf": [ { "properties": { "detected": { "type": "string", "enum": [ "other" ] } }, "required": [ "detected_explanation" ] },
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
"detected" is mentioned in the beginning as required. But try to change the schema and check the result.
@gauravdalal9280
@gauravdalal9280 3 жыл бұрын
hi Mike, Thanks for the great article. i need to validate a json against 'json schema" using java code. would you be able to share something helpful? thanks a ton in advance.
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
Try this article: www.baeldung.com/introduction-to-json-schema-in-java
@gauravdalal9280
@gauravdalal9280 3 жыл бұрын
@@MikesTechCorner Thanks for the suggestion. I followed this and this is working fine. Also in the example it says Schema schema = SchemaLoader.load(jsonSchema); schema.validate(jsonSubject); So if the schema validation fails it will give exception/error but in case of success it is not returning anything so "Is there a way to tell if the schema validation is successfully done"? I don't want to use System.out.println("Schema validation successfully done"); 🙂🙂
@velhobugado0230
@velhobugado0230 2 жыл бұрын
the procedure is the same in pycharm which made it much easier
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
Thank you for the tip.
@hossamshehata-wp5gp
@hossamshehata-wp5gp Жыл бұрын
can i add http method in the schema ?
@MikesTechCorner
@MikesTechCorner Жыл бұрын
No because it is a description of the data format... not a specification of protocol
@movimovimania5521
@movimovimania5521 2 жыл бұрын
Like you can create XML API samples from XML Schema can we create JSON API requests from JSON Schema?
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
I think it is possible... I don't remember though... I think I would create the data with a Spring Boot unittest that generates the json... Maybe with Faker.
@movimovimania5521
@movimovimania5521 2 жыл бұрын
@@MikesTechCorner Thanks Mike, would love to see a sample or some resources that cover this topic if you know / come across ..🙏
@sproutboot
@sproutboot 2 жыл бұрын
Bear cute
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
lol
@mysocial
@mysocial 2 жыл бұрын
Jumped to 13:00
@MikesTechCorner
@MikesTechCorner 2 жыл бұрын
Check
@lokesh-qz6cc
@lokesh-qz6cc 3 жыл бұрын
it is bit hard to follow your english pronunciation.
@MikesTechCorner
@MikesTechCorner 3 жыл бұрын
I am sorry. I will try to improve. Join my discord server. links are in the latest videos. :-) Thx for watching.
Part 1 - JSON Schema For API Validation
39:23
Ganbaro Digital
Рет қаралды 20 М.
JSON Schema Validation in Python: Bring Structure Into JSON
13:45
БИМ БАМ БУМ💥
00:14
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 3,1 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 45 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН
Pleased the disabled person! #shorts
00:43
Dimon Markov
Рет қаралды 28 МЛН
You Need to Document Your Swift Code with DocC
10:52
Sean Allen
Рет қаралды 4,9 М.
GSON: Use in IntelliJ
10:56
Brian Fraser
Рет қаралды 9 М.
Why You Should Use Pydantic in 2024 | Tutorial
13:56
ArjanCodes
Рет қаралды 65 М.
Ajv JSON schema validation
14:51
Jan Goebel
Рет қаралды 17 М.
Spring Boot: JSON logging with logback
30:20
Mike Møller Nielsen
Рет қаралды 9 М.
Maintaining JSON Schemas at Scale - Jason Desrosiers
30:07
OpenAPI Initiative
Рет қаралды 2,4 М.
JSON Schema Validation in Rest Assured
12:38
Testers Talk
Рет қаралды 3,6 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
JSON Schema validation in Postman
9:29
Valentin Despa
Рет қаралды 47 М.
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
Сколько реально стоит ПК Величайшего?
0:37
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 374 М.
Это - iPhone 16 и вот что надо знать...
17:20
Overtake lab
Рет қаралды 139 М.
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 6 МЛН