How can I validate a JSON string against a schema programmatically?

.net, java, json, validation

Solution

For .NET you could use Json.NET which supports schema validation.

Problem

Are there simple libraries out there (.NET and Java) that are able to validate a JSON string given a schema definition? It should work similar to how XML can be validated using XSD. EDIT: I need .NET and Java libraries. Thanks to darin for the .NET link!

Original source