From 0e82d8761510e04ff319c5bbb53fda9b7db78eb1 Mon Sep 17 00:00:00 2001 From: "S.F" Date: Sat, 10 Jul 2021 23:14:59 -0400 Subject: [PATCH] Easier interaction with JSON There s probably a reason why it s not here , but I do not see it to use with JSON::XS->new->convert_blessed->encode This is more of a question than a true PR --- lib/DBIx/Class/Row.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index d326cf003..d6cf4c44b 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -1590,6 +1590,23 @@ sub throw_exception { Returns the primary key(s) for a row. Can't be called as a class method. Actually implemented in L +=head2 WHY THE HELL NOT ? + +JSON MUCH FUN # This is more of a question than a true PR +<< Allow fast JSON encoding with >> +JSON::XS->new->convert_blessed->encode + +=cut + +sub TO_JSON { + my $c = shift; + return $c->{_column_data}; +} + +=back + +some data + =head1 FURTHER QUESTIONS? Check the list of L.