Download the PHP package tonirilix/nested-json-flattener without Composer

On this page you can find all versions of the php package tonirilix/nested-json-flattener. 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 nested-json-flattener

NestedJsonFlattener

Code Climate Build Status codecov Latest Stable Version Total Downloads Latest Unstable Version License

A php package to flatten nested json objects and nested arrays. It also allows you to create csv files from the flattened data.

Features

  1. The package allows you to select a specific node of the json object or array and flat it. The selected node can be flattened whether is a object or collection.

  2. It takes in count the full path where a value is stored in a nested json object and uses it as header name. Let's use the example below.

If we'd like to flat that json object and put it into a csv file, the result would be as follows:

name nested.type nested.location nested.geo.latitude nested.geo.longitude nested.primitivesCollection
This is a name This is a type Earth 1234567890 0987654321 123, 456, 789

Credits

It's based on csvwriter npm package implementation.

How to use it

If you need to flat a nested json string

If you need to flat a nested array

If you need to select a specific path to be flattened

Read JsonPath documentation from Stefan Goessner to learn how to create paths.

If you need to write a csv file

TODO

  1. The package still needs to get configurations from params. See milestone
  2. Some of the params in mind are: whether take primitives arrays as one element or not (taken as one element by default)
  3. Add a way to create a configuration to tell the class how to handle internal collections. See milestone

All versions of nested-json-flattener with dependencies

PHP Build Version
Package Version
No informations.
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 tonirilix/nested-json-flattener contains the following files

Loading the files please wait ....