README 714 B

123456789101112131415161718
  1. perl-JSON-MaybeXS (Use Cpanel::JSON::XS with a fallback to
  2. JSON::XS and JSON::PP)
  3. This module first checks to see if either Cpanel::JSON::XS or
  4. JSON::XS is already loaded, in which case it uses that module.
  5. Otherwise it tries to load Cpanel::JSON::XS, then JSON::XS,
  6. then JSON::PP in order, and either uses the first module it
  7. finds or throws an error.
  8. It then exports the encode_json and decode_json functions from
  9. the loaded module, along with a JSON constant that returns the
  10. class name for calling new on.
  11. If you're writing fresh code rather than replacing JSON.pm
  12. usage, you might want to pass options as constructor args
  13. rather than calling mutators, so we provide our own new method
  14. that supports that.