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 (2 months ago) RSS 2.0 feedStarStarStar 52%Total: 206 This week: 2All time: 7,779 This week: 591Up
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
Nominee
Vote
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
Picture of Janjan
  Performance   Level  
Name: Janjan <contact>
Classes: 1 package by
Country: Philippines Philippines
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:206
This week:2
All time:7,779
This week:591Up
 User Ratings  
 
 All time
Utility:65%StarStarStarStar
Consistency:60%StarStarStarStar
Documentation:70%StarStarStarStar
Examples:70%StarStarStarStar
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:1864