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

πŸ“¦
version 8.12 Β· 5 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Search::Elasticsearch::Serializer::JSON πŸ’–

okay bestie, this is Search::Elasticsearch::Serializer::JSON β€” the default JSON Serializer, and it's out here doing its thing with JSON::MaybeXS. no cap. πŸŽ€


✨ VERSION ✨

version 8.12 β€” she's giving current, she's giving slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

$e = Search::Elasticsearch(
    # serializer => 'JSON'
);

like... that's it. that's the whole vibe. the default already is 'JSON', so you don't even gotta say it (iykyk). 🌸


πŸ’œ DESCRIPTION πŸ’œ

So this default Serializer class is lowkey a little matchmaker β€” it picks between three whole JSON backends like it's casting a main character:

  • Cpanel::JSON::XS
  • JSON::XS
  • JSON::PP

Here's the tea on how it chooses πŸ“:

First, it peeks to see if either Cpanel::JSON::XS or JSON::XS is already loaded β€” and if one of them is, boom, it just uses the appropriate backend right then and there. no drama, no loading anything new. ✨

Otherwise? It goes down the list and tries to load them in order: first Cpanel::JSON::XS, then JSON::XS, and finally JSON::PP. so if the fancy ones aren't around, JSON::PP is there as the reliable bestie who always shows up. 🫢

But wait β€” what if you're picky and you want a specific JSON backend? iconic of you, honestly. You can do that by using one of these modules instead:

  • Search::Elasticsearch::Serializer::JSON::Cpanel
  • Search::Elasticsearch::Serializer::JSON::XS
  • Search::Elasticsearch::Serializer::JSON::PP

See their documentation for the details, babe β€” they each got their own whole thing going on. πŸ“–


πŸ‘‘ AUTHOR πŸ‘‘

Enrico Zimuel <enrico.zimuel@elastic.co> β€” yes, the author, we stan πŸ’–


This software is Copyright (c) 2024 by Elasticsearch BV.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004

so like, go forth, use it, it's free fr fr. no gatekeeping. ⭐


and that's the whole page, bestie!! this lil writeup is from perl v5.38.2, dated 2024-02-04, and it's the manual for Search::Elasticsearch::Serializer::JSON(3pm). go serialize something gorgeous πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from