Config::Any::JSON(3)

πŸ’– Config::Any::JSON(3) πŸ’–

okay so bestie, welcome to the Config::Any::JSON manual page β€” this is the Perl doc for the little module that lets you load JSON config files. it lives in the User Contributed Perl Documentation section, and honestly? it's giving tiny-but-mighty. πŸŽ€


✨ NAME ✨

Config::Any::JSON β€” Load JSON config files. that's it, that's the whole job, and it eats. πŸ’…


🌸 DESCRIPTION 🌸

It loads JSON files. that's the vibe. no cap, that's literally what it does.

here's an example so you can see the shape of it:

{
    "name": "TestApp",
    "Controller::Foo": {
        "foo": "bar"
    },
    "Model::Baz": {
        "qux": "xyzzy"
    }
}

see how the keys map to your app name and your Controller::Foo and Model::Baz? iconic structure. πŸ¦‹


πŸ’œ METHODS πŸ’œ

🌟 extensions( )

returns an array of valid extensions β€” and those are "json" and "jsn". yes, both. jsn is real, it's not a typo, put some respect on it. 😭

🌟 load( $file )

attempts to load $file as a JSON file. that's the whole gig β€” hand it a file, it tries to load it. ✨

🌟 requires_any_of( )

this one's the important one, so listen up bestie: it specifies that this module requires one of Cpanel::JSON::XS, JSON::MaybeXS, JSON::DWIW, JSON::XS, JSON::Syck, JSON::PP or JSON in order to work.

so like β€” you need at least one of those installed, or this whole thing is not happening. vibe check failed, no JSON for you. πŸ’€


πŸŽ€ AUTHOR πŸŽ€

Brian Cassidy <bricas@cpan.org> β€” the main character who wrote this. πŸ‘‘


Copyright 2006-2016 by Brian Cassidy.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

(so yes, it's free software, same terms as Perl itself β€” go be free with it. 🫢)


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catalyst
  • Config::Any
  • Cpanel::JSON::XS
  • JSON::MaybeXS
  • JSON::DWIW
  • JSON::XS
  • JSON::Syck
  • JSON

like, the whole JSON family reunion is in this list and we love that for them. 🌈


okay that's the page!! mwah πŸ’‹ β€” this was Config::Any::JSON(3), from perl v5.42.0, dated 2023-05-04. go load some JSON, bestie, you got this. β­πŸ’–

πŸ“¦ where this page comes from