All Projects → jto → Validation

jto / Validation

validation api extracted from play

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Validation

Fsharp.data
F# Data: Library for Data Access
Stars: ✭ 631 (+225.26%)
Mutual labels:  json, xml, csv
Parsrs
CSV, JSON, XML text parsers and generators written in pure POSIX shellscript
Stars: ✭ 56 (-71.13%)
Mutual labels:  json, xml, csv
Structured Text Tools
A list of command line tools for manipulating structured text data
Stars: ✭ 6,180 (+3085.57%)
Mutual labels:  json, xml, csv
Omniparser
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.
Stars: ✭ 148 (-23.71%)
Mutual labels:  json, xml, csv
Dbwebapi
(Migrated from CodePlex) DbWebApi is a .Net library that implement an entirely generic Web API (RESTful) for HTTP clients to call database (Oracle & SQL Server) stored procedures or functions in a managed way out-of-the-box without any configuration or coding.
Stars: ✭ 84 (-56.7%)
Mutual labels:  json, xml, csv
Countries
World countries in JSON, CSV, XML and Yaml. Any help is welcome!
Stars: ✭ 5,379 (+2672.68%)
Mutual labels:  json, xml, csv
Ps Webapi
(Migrated from CodePlex) Let PowerShell Script serve or command-line process as WebAPI. PSWebApi is a simple library for building ASP.NET Web APIs (RESTful Services) by PowerShell Scripts or batch/executable files out of the box.
Stars: ✭ 24 (-87.63%)
Mutual labels:  json, xml, csv
Choetl
ETL Framework for .NET / c# (Parser / Writer for CSV, Flat, Xml, JSON, Key-Value, Parquet, Yaml, Avro formatted files)
Stars: ✭ 372 (+91.75%)
Mutual labels:  json, xml, csv
Magento2 Import Export Sample Files
Default Magento 2 CE import / export CSV files & sample files for Firebear Improved Import / Export extension
Stars: ✭ 68 (-64.95%)
Mutual labels:  json, xml, csv
Countries States Cities Database
🌍 World countries, states, regions, provinces, cities, towns in JSON, SQL, XML, PLIST, YAML, and CSV. All Countries, States, Cities with ISO2, ISO3, Country Code, Phone Code, Capital, Native Language, Timezones, Latitude, Longitude, Region, Subregion, Flag Emoji, and Currency. #countries #states #cities
Stars: ✭ 1,130 (+482.47%)
Mutual labels:  json, xml, csv
Servicestack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
Stars: ✭ 4,976 (+2464.95%)
Mutual labels:  json, xml, csv
Iso 3166 Countries With Regional Codes
ISO 3166-1 country lists merged with their UN Geoscheme regional codes in ready-to-use JSON, XML, CSV data sets
Stars: ✭ 1,372 (+607.22%)
Mutual labels:  json, xml, csv
Specs
Technical specifications and guidelines for implementing Frictionless Data.
Stars: ✭ 403 (+107.73%)
Mutual labels:  json, csv, validation
Uxdm
🔀 UXDM helps developers migrate data from one system or format to another.
Stars: ✭ 159 (-18.04%)
Mutual labels:  json, xml, csv
Stream Parser
⚡ PHP7 / Laravel Multi-format Streaming Parser
Stars: ✭ 391 (+101.55%)
Mutual labels:  json, xml, csv
Sheetjs
📗 SheetJS Community Edition -- Spreadsheet Data Toolkit
Stars: ✭ 28,479 (+14579.9%)
Mutual labels:  json, xml, csv
Sq
swiss-army knife for data
Stars: ✭ 275 (+41.75%)
Mutual labels:  json, xml, csv
Http Rpc
Lightweight REST for Java
Stars: ✭ 298 (+53.61%)
Mutual labels:  json, xml, csv
Fhir.js
Node.JS library for serializing/deserializing FHIR resources between JS/JSON and XML using various node.js XML libraries
Stars: ✭ 61 (-68.56%)
Mutual labels:  json, xml, validation
Filecontextcore
FileContextCore is a "Database"-Provider for Entity Framework Core and adds the ability to store information in files instead of being limited to databases.
Stars: ✭ 91 (-53.09%)
Mutual labels:  json, xml, csv

The unified data validation library

Travis Coverage Status Maven Scala.js Gitter

Overview

The unified validation API aims to provide a comprehensive toolkit to validate data from any format against user defined rules, and transform them to other types.

Basically, assuming you have this:

import play.api.libs.json._
import jto.validation._

case class Person(name: String, age: Int, lovesChocolate: Boolean)

val json = Json.parse("""{
  "name": "Julien",
  "age": 28,
  "lovesChocolate": true
}""")

implicit val personRule = {
  import jto.validation.playjson.Rules._
  Rule.gen[JsValue, Person]
}

It can do this:

scala> personRule.validate(json)
res0: jto.validation.VA[Person] = Valid(Person(Julien,28,true))

BUT IT'S NOT LIMITED TO JSON

It's also a unification of play's Form Validation API, and its Json validation API.

Being based on the same concepts as play's Json validation API, it should feel very similar to any developer already working with it. The unified validation API is, rather than a totally new design, a simple generalization of those concepts.

Design

The unified validation API is designed around a core defined in package jto.validation, and "extensions". Each extension provides primitives to validate and serialize data from / to a particular format (Json, form encoded request body, etc.). See the extensions documentation for more information.

To learn more about data validation, please consult Validation and transformation with Rule, for data serialization read Serialization with Write. If you just want to figure all this out by yourself, please see the Cookbook.

Using the validation api in your project

Add the following dependencies your build.sbt as needed:

resolvers += Resolver.sonatypeRepo("releases")

val validationVersion = "2.1.0"

libraryDependencies ++= Seq(
  "io.github.jto" %% "validation-core"      % validationVersion,
  "io.github.jto" %% "validation-playjson"  % validationVersion,
  "io.github.jto" %% "validation-jsonast"   % validationVersion,
  "io.github.jto" %% "validation-form"      % validationVersion,
  "io.github.jto" %% "validation-delimited" % validationVersion,
  "io.github.jto" %% "validation-xml"       % validationVersion
  // "io.github.jto" %%% "validation-jsjson"    % validationVersion
)

Play dependencies

Validation Play
2.1.x 2.6.x
2.0.x 2.5.x
1.1.x 2.4.x
1.0.2 2.3.x

Documentation

Documentation is here

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].