2017 © Pedro Peláez
 

library jsonappend

A simple PHP library package to append JSON entries into a pre-existing JSON file

image

dhiraj1site/jsonappend

A simple PHP library package to append JSON entries into a pre-existing JSON file

  • Tuesday, January 23, 2018
  • by dhiraj1site
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

JSON Append Library

If you are trying to append a JSON entry into a pre-existing JSON file, you can use this library to add/append additional entries to a JSON file format. This package also supports a separate function to ignore pre-existing JSON entries., (*1)

Installation

composer require dhiraj1site/jsonappend, (*2)

Usage

There are basically two major functions used in the JSONAppend class., (*3)

Function #1 - appendJSON

This function requires two parameters. The first parameter will be the source JSON file you need to append into. The second parameter will be an array with key/value pair which you require to append into the source JSON file., (*4)

@param1 - .json file @param2 - array $appenditems, (*5)

Function #2 - appendUniqueJSON

This function is similar to appendJSON. Except this ignores duplicate JSON entires. Parameters are the same as above, (*6)

use JSONAppend;
JSONAppend::appendUniqueJSON('services.json', array($items));

The Versions

23/01 2018

dev-master

9999999-dev

A simple PHP library package to append JSON entries into a pre-existing JSON file

  Sources   Download

dbad

The Requires

  • php >=5.4

 

The Development Requires

by Dhiraj Timalsina

json composer append