Download the PHP package blackprism/serializer without Composer

On this page you can find all versions of the php package blackprism/serializer. 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 serializer

Not maintained anymore, Symfony Serializer is enough.

Serializer Build Status

A fast and simple json serializer library for PHP 7.0+

Serializer has been designed to be very fast and with low memory usage.

How to use it ?

According you have these objects you want to serialize/unserialize

First you need to setup the configuration, pure PHP, no yml, no xml. Faster and lighter.

Now, you can serialize an object

Output is:

And unserialize a json

Output is:

Custom handler

From previous sample, you change a bit the configuration to this:

You have a collection of object at root node?

Assuming you have this json:

You need to use deserializeCollection:

You can use it to serialize/unserialize for a noSQL

When using a nosql you often add a property to your document to specify what type of document it is, for example:

Configuration for identified document

Now, you can serialize to a typed object json

Output is:

And unserialize a typed object json

Output is:

Note: You have identified document, so you don't need to use deserializeCollection even if the root node is a collection.

Benchmark

For 100,000 iterations :

Library Serialize time Serialize memory Deserialize time Deserialize Memory
JMS Serializer 1.951 sec 1537 KB 1.829 sec 1547 KB
Symfony Serializer 0.210 sec 486 KB 0.298 sec 488 KB
Blackprism Serializer 0.352 sec 464 KB 0.311 sec 457 KB

Test protocol can be found on Serializer Benchmark

Conclusion

As you can see, Blackprism Serializer isn't really the fastest, but it has a quick and simple configuration with very good performance, almost the same as Symfony Serializer which has a more complex configuration.


All versions of serializer with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.7
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 blackprism/serializer contains the following files

Loading the files please wait ....