Moved functions from lib_json to api_help