Fixed lib_json encode in search

The develop branch had a previous version of encode (json_handler - lib_json)