
Json::maybexs first checks to see if either cpanel::json::xs or json::xs is already loaded, in which case it uses that module. otherwise it tries to load cpanel::json::xs, then json::xs, then json::pp in order, and either uses the first module it finds or throws an error.
it then exports the encode_json and decode_json functions from the loaded module, along with a json constant that returns the class name for calling new on.