Json fIeld validation no specific to vertx but answers are helpful for microservice world.

238 views
Skip to first unread message

javadevmtl

unread,
Sep 26, 2016, 12:09:30 PM9/26/16
to vert.x
Vertx is where I probably hang the most lol and well since I use vertx for almost everything...

How do you fine vertexians do json field validation? I.e: Mandatory vs Optional, type, length etc...

Do you map to an object and then use something like hibernate bean validation?

Henrik Östman

unread,
Sep 26, 2016, 3:19:06 PM9/26/16
to vert.x
I have a JSON Schema I check against.

// Henrik

John Smith

unread,
Sep 26, 2016, 4:55:23 PM9/26/16
to ve...@googlegroups.com
Yeah cool. And are you using the json-schema-validator here: https://github.com/daveclayton/json-schema-validator ?

--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/Y2xDBybq8zo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/0db87f67-822f-466c-9b08-fba222147ebd%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Henrik Östman

unread,
Sep 27, 2016, 5:30:15 PM9/27/16
to vert.x
Actually I use one for Javascript since we are running Node.js at my work, I currently run Vert.x only for my home pet projects.
But if I ever should to something similair in Java then, yes the validator you suggested would be fine I guess.


Den måndag 26 september 2016 kl. 22:55:23 UTC+2 skrev javadevmtl:
Yeah cool. And are you using the json-schema-validator here: https://github.com/daveclayton/json-schema-validator ?
On 26 September 2016 at 15:19, Henrik Östman <try...@gmail.com> wrote:
I have a JSON Schema I check against.

// Henrik

Den måndag 26 september 2016 kl. 18:09:30 UTC+2 skrev javadevmtl:
Vertx is where I probably hang the most lol and well since I use vertx for almost everything...

How do you fine vertexians do json field validation? I.e: Mandatory vs Optional, type, length etc...

Do you map to an object and then use something like hibernate bean validation?

--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/Y2xDBybq8zo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.

Paulo Lopes

unread,
Sep 28, 2016, 5:23:52 AM9/28/16
to vert.x
Long ago i wrote a json-schema validator, it has been used in real projects but it does not follow the full spec since it was made mostly to be used with swagger validation. It had no external dependencies except the JDK itself and vert.x JsonObject/JsonArray if i recall correctly. You can see the code here:

https://github.com/pmlopes/yoke/tree/develop/framework/src/main/java/com/jetdrone/vertx/yoke/json

Maybe it would be an idea to extract it to its own library if there's a need for it.
Reply all
Reply to author
Forward
0 new messages