This module 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.
If you're writing fresh code rather than replacing JSON.pm usage, you might want to pass options as constructor args rather than calling mutators, so we provide our own 'new' method that supports that.
Package Version | Update ID | Released | Package Hub Version | Platforms | Subpackages |
---|---|---|---|---|---|
1.004000-bp156.3.1 info | GA Release | 2023-07-22 | 15 SP6 |
|
|
1.004000-bp155.2.11 info | GA Release | 2023-05-17 | 15 SP5 |
|
|
1.004000-bp154.1.46 info | GA Release | 2022-05-09 | 15 SP4 |
|
|
1.004000-bp153.1.16 info | GA Release | 2021-03-06 | 15 SP3 |
|
|
1.004000-bp152.3.23 info | GA Release | 2020-04-16 | 15 SP2 |
|
|
1.004000-bp151.3.1 info | GA Release | 2019-07-16 | 15 SP1 |
|
|
1.004000-bp151.2.14 info | GA Release | 2019-05-18 | 15 SP1 |
|
|
1.004000-bp150.2.4 info | GA Release | 2018-07-30 | 15 |
|
|