Download the PHP package vrijdag/jsonvalidator without Composer

On this page you can find all versions of the php package vrijdag/jsonvalidator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jsonvalidator

Use using composer:

Beware that this is currently more a proof of concept, as it does more or less basic JSON validation.

The why:

When working with JSON API's it's a lot of hassle validating the response. Are you going to do it something like this?

And this is only a really, really simple example. Usually it is loop in loop in loop.

JSON Schema

Then there is JSON Schema, which is great, but:

JSON Validator

So I started working on this little JSON validator. Lets take this Yahoo weather as a example request: https://gist.github.com/vrijdag/54d17f2158e538c0ad723d7e544523ee

In this response we can find all sorts of data, let's say I need the following:

Based on the response I have to create this 'schema'. Only the fields in this schema are required to be in the response, all other data is left alone.

That's quite a clear file:

... and so on.

A special one is the forecast property. Based on the schema, this should contain an array of which each entry should be an object containing a high property which should be a number (that is a numeric string, not an int or float).

Tying this together

So tying to this together we have a JSON response from the API and a schema, it would be something like this to validate:


All versions of jsonvalidator with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vrijdag/jsonvalidator contains the following files

Loading the files please wait ....