Messag...r::JSON(3pm)

πŸ“¦
version 0.117 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute

✨ NAME ✨

Message::Passing::Role::Filter::Encoder::JSON β€” bestie, this is a role that encodes your data structures as JSON so they can head out the door πŸ’…

(yeah it's a 3pm page, straight out of the User Contributed Perl Documentation, and the header up top is literally truncated to Messag...r::JSON(3pm) which is so real of it 🫢)


🌸 DESCRIPTION 🌸

okay so picture this: this filter grabs a message that's either a hash ref or an object, and serializes it to JSON. that's the whole job. that's the vibe. ✨

Plain refs work exactly as you'd expect, no surprises, no drama πŸ’–

And classes generated by either of these icons:

  • Log::Message::Structures
  • MooseX::Storage

should be correctly serialized. as they should be, honestly πŸ‘‘


πŸŽ€ METHODS πŸŽ€

filter

Performs the JSON encoding. that's it. that's the method. she encodes. πŸ’…

pretty

Attribute controlling if JSON is pretty printed. so if you want your JSON looking all formatted and gorgeous instead of squished onto one line, that's the one, iykyk 🌈


πŸ”₯ SEE ALSO πŸ”₯

  • Message::Passing
  • Message::Passing::Manual::Concepts

go read these, fr fr, they're the lore πŸ¦‹


πŸ’– SPONSORSHIP πŸ’–

This module exists due to the wonderful people at Suretec Systems Ltd. <http://www.suretecsystems.com/> who sponsored its development for its VoIP division called SureVoIP <http://www.surevoip.co.uk/> for use with the SureVoIP API - <http://www.surevoip.co.uk/support/wiki/api_documentation>

not me getting emotional over sponsorship 😭 absolute legends, no cap 🌟


See Message::Passing.

(short king answer, but that's literally what it says πŸ’€)


and that's the whole page bestie!! this was documented with perl v5.32.1 and dated 2021-11-09 β€” mwah, go encode something gorgeous πŸ’œβœ¨