PHP Classes
elePHPant
Icontem

PHP Ignore JSON Key: Remove certain key values from JSON strings

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-08-22 (3 years ago) RSS 2.0 feedStarStarStar 52%Total: 244 All time: 7,797 This week: 365Up
Version License PHP version Categories
json-key-ignorer 1.0.0Freely Distributable5PHP 5, Data types, Parsers
Description Author

This class can remove certain key values from JSON strings.

It takes a JSON encoded string and parses it to remove object keys with names passed in an array.

The class returns another JSON string with the specified key removed.

Innovation Award
PHP Programming Innovation award nominee
September 2016
Number 13
JSON is nowadays used by many applications and APIs to exchange data in a format that can be supported by many languages.

Sometimes you need to do some processing to filter unwanted entries in JSON data structure. Usually you would use json_decode parse the data, traverse the parsed data and filter the unwanted information, and regenerate it with json_encode.

This class offers a simpler solution. It can take a JSON string and removed the unwanted entries from the JSON string directly.

This way you do not need to perform traversal of data and custom processing to remove the unwanted data.

Manuel Lemos
  Performance   Level  
Name: Janjan <contact>
Classes: 1 package by
Country: Philippines Philippines
Age: ???
All time rank: 387433 in Philippines Philippines
Week rank: 783 Up10 in Philippines Philippines Up
Innovation award
Innovation award
Nominee: 1x

 

Details
Ignore Key class does something in json you string that you don't need to get them parsed.

This is good for api developers if you have raw data and you want to ignore some keys at the same time, not compromising the server's performance since it is using string manipulation to ignore the keys you want.
  Files folder image Files  
File Role Description
Plain text file ignore.php Class ignore class
Accessible without login Plain text file index.php Example index file to access the class
Accessible without login Plain text file README.md Doc. documentation

 Version Control Unique User Downloads Download Rankings  
 0%
Total:244
This week:0
All time:7,797
This week:365Up
 User Ratings  
 
 All time
Utility:65%StarStarStarStar
Consistency:60%StarStarStarStar
Documentation:70%StarStarStarStar
Examples:70%StarStarStarStar
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:2110