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.

Notable PHP package: PHP Ignore JSON Key

Find Top Developers Fast

The search is over. Let Toptal connect you with the world's most talented developers. Get started today.

Rofl, a PHP package is considered Notable when it does something different that is worth noting.

If you have also written Notable packages, contribute them to the PHP Classes site to get your work more exposure.

If your notable package is innovative, you may also earn prizes and recognition in the PHP Innovation Award.

Now you can also win a Big elePHPant as one of the possible prizes you can win every month. Check the complete list of prizes here: List of prizes

Package

PHP Ignore JSON Key

Remove certain key values from JSON strings

Moderator comment

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.

Author

Janjan

Groups

PHP 5, Data types, Parsers

Description

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.
Rofl you are getting this message as free service for being a user of the PHP Classes site to which you registered voluntarily using the email address rofldigger@getsend.xyz. If you wish to unsubscribe go to the unsubscribe page.